summary of matplotlib using.
to find more information, click here
install
1 | pip install matplotlib |
basic plot
1 | import matplotlib.pyplot as plt |
element of a figure
details
to find more info, use matplotplib.pyplot API
1 | plt.plot(x, y1, color="blue", linewidth=1.0, linestyle="-", label="bla"...) # configure the line style |
bar
1 | plt.bar(x,height, width,*,align='center',**kwargs) |
box
1 | plt.boxplot() |
note: the figure will plot the upper quartile $Q_3$, the lower quartile $Q_1$, the median. let $IQR=Q_3-Q_1$ be the interquartile range. Then the lower whisker (fence) is at $max(mindata, Q_1-1.5IQR)$ and the upper whisker (fence) is at $min(maxdata, Q_3+1.5IQR)$. The points below lower whisker and above the upper whisker are the so called outliers or fliers.