#Day12 of #DataAnalytics #Matplotlib Creating figures through object-oriented method: create an empty canvas, then just call methods or attributes off of that object. - plt.figure() - plt.subplot(nrows=,ncols=)
1
0
0
Replies
Many customizations: - figsize( , ) to adjust width and height of figure - colour of line (can be hex codes. alpha to indicate transparency of line) - linewidths (lw=) - linestyles (ls=) eg dashed/dotted eg 'b.-' blue line with dots - maker symbols 'o' '+' - marker size
1
0
0
Adding a legend to the plot by specifying label=' ' in the method. (view pic) Can specify the position of legend by: axes.legend(loc=n) where the numeric signifies a specific position (view documentation). loc=0 to let matplotlib decide optimal location.
1
0
0