histscat py import matplotlib pyplot as plt import numpy as np np random randn ( np random randn ( np random randn ( plt subplot ( first subplot plt hist( ,bins = facecolor =' 'plt xlabel (' variable 'plt ylabel ('counts 'plt subplot ( second subplot plt scatter ( , , =' 'alpha = plt show ( counts variable figure histogram and scatterplot one can also create three-dimensional plots as illustrated below surf dscat py import matplotlib pyplot as plt import numpy as np from mpl_toolkits mplot import axes def npdf( , )return np exp - *pow( , )+pow( , )))/np sqrt ( np pixy np random randn ( np random randn ( npdf( ,yxgrid ygrid np linspace - , , np linspace - , , xarray yarray np meshgrid (xgrid ygrid