the subplot grid(function takes number of parametersexplained as followsshapea tuple representing rows and columns in the grid as (rowscolumnsloca tuple representing the location of subplot this parameter is indexed rowspanthis parameter represents the number of rows the subplot covers colspanthis parameter represents the number of columns the subplot extends to the output generated in figure - by the snippet has one subplot covering four rows and two columns containing two functions the other two subplots cover two rows and one column each figure - subplots using subplot grid(plot formatting formatting plot is another important aspect of storytelling and matplotlib provides us plenty of features here from changing colors to markers and so onmatplotlib provides easy-to-use intuitive interfaces we begin with the color attributewhich is available as part of the plot(interface the color attribute works on the rgba specificationsallowing us to provide alpha and color values as strings (redgreenand so on)as single letters (rgand so onand even as hex values more details are available on the matplotlib documentation at the following example and output depicted in figure - illustrates how easy it is to set color and alpha properties for plots color ax plt subplot( plt plot( , ,color='green'ax set_title('line color'alpha ax plt subplot( ,sharex=ax alpha plt plot( ,