<jupyter_start><jupyter_text>Of all these functions, ax.fill_between(...) is probably one of the most often. In its most basic form, it fills between the given y-values and 0.<jupyter_code>np.random.seed(1)
y=np.random.randn(100).cumsum()
x=np.linspace(0,10,100)
fig,ax=plt.subplots()
ax.fill_between(x,y,color='orange')
plt.show()<jupyter_output><empty_output><jupyter_text>However, it can also be used to fill between two curves. Particularly useful when you want to show an envelope of some sort(e.g, error, amplitude, confidence,etc).<jupyter_code>x=np.linspace(0,10,200)
y1=2*x+1
y2=3*x+1.2
y_mean=0.5*x*np.cos(2*x)+2.5*x+1.1
fig,ax=plt.subplots()
#plot the envelope with fill_between
ax.fill_between(x,y1,y2, color='yellow')
#plot the centerline with'plot'
ax.plot(x,y_mean,color='black')
plt.show()<jupyter_output><empty_output><jupyter_text>The Data keyword argumentthis feature uses the datatype: dictionaries<jupyter_code>x= np.linspace(0,10,200)
data_obj={'x':x,
          'y1':2*x+1,
          'y2':3*x+1.2,
          'mean':0.5*x*np.cos(2*x)+2.5*x+1.1}
fig,ax=plt.subplots()
ax.fill_between('x','y1','y2', color='yellow', data=data_obj)
ax.plot('x', 'mean',color='black',data=data_obj)
plt.show()

np.random.seed(1)
# the Data
y_raw=np.random.randn(1000).cumsum()+15
x_raw=np.linspace(0,24,y_raw.size)
#get averages of every 100 samples
x_pos=x_raw.reshape(-1,100).min(axis=1)
y_avg=y_raw.reshape(-1,100).mean(axis=1)
y_err=y_raw.reshape(-1,100).ptp(axis=1)

x_pred=np.linspace(0,30)
y_max_pred=y_avg[0]+y_err[0]+2.3*x_pred
y_min_pred=y_avg[0]-y_err[0]+1.2*x_pred

fig,ax= plt.subplots()
ax.fill_between=(x_pred, y_max_pred, y_min_pred, color='blue')
ax.bar(x_pos, y_avg, color='wheat', width=bar_width, yerr=y_err,
       edgecolor='gray')
ax.plot(x_raw, y_raw,color='salmon')
ax.set(title='future projection of attitudes'
      ylabel='snarkiness(snark units),
       xlabel='minutes since class begun')
plt.show()<jupyter_output><empty_output><jupyter_text>Input Data:2D Arrays or Imagesthere are several options for plotting 2D datasets, imshow(),pcolor(),pcolormesh()<jupyter_code># adding a colorbar
from matplotlib.cbook import get_sample_data
data=np.load(get_sample_data('Pictures/img_2018208_171956.jpg'))

fig,ax=plt.subplots()
im=ax.imshow(data,cmap='girl')
fig.colorbar(im)
plt.show()<jupyter_output><empty_output><jupyter_text>You must ensure that you call the colorbar on the fig() method and not the axes() method<jupyter_code>import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
fig,ax=plt.subplots()
cax=fig.add_axes([0.27,0.8,0.5,0.05])
data=([1,4,9,16,25],[1,2,3,4,5])
im=ax.imshow(data,cmap='gist_earth')
fig.colorbar(im,cax=cax,orientation='horizontal')
plt.show()<jupyter_output><empty_output><jupyter_text>Shared parameters for imshow,pcolormesh,contour,scatter,etc1. cmap- the colormap or basically gives the colour to the data input2.vmin-the minimum data value that will correspond to the 'bottom' of the colormap3. vmax-the maximum data that will correspond to the 'top' of the colormap.<jupyter_code>import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
np.random.seed(1)
# generate random data with different ranges
data1=np.random.random((10,10))
data2=2*np.random.random((10,10))
data3=3*np.random.random((10,10))
# set up your figure and axes
fig,axes=plt.subplots(ncols=3, figsize=plt.figaspect(0.5))
fig.tight_layout() # makes the subplots fill up the figures a bit more
cax=fig.add_axes([0.25,0.1,0.55,0.03]) # the axes for the colorbar
# using a for loop
for ax,data in zip(axes,[data1,data2,data3]):
    im=ax.imshow(data, vmin=0,vmax=3, interpolation='nearest')
fig.colorbar(im, cax=cax, orientation='horizontal')
plt.show()


# getting to use markers
import numpy as np
import matplotlib.pyplot as plt
t=np.arange(0.0,5.0,0.2)
plt.plot(t,t,"*y", t,t**2,"8m", t,t**3,"sg")
plt.show()
t=np.arange(0.0,5.0,0.2)
plt.plot(t,t,"-", t, t**2,"--", t,t**3,"-.", t,-t,":")
plt.show()
t=np.arange(0.0,5.0,0.2)
a=np.exp(-t)*np.cos(2*np.pi*t)
plt.plot(t,a,'r:D',mfc='y',mec='g')
plt.show()<jupyter_output><empty_output>