MatplotLib
Basic
Matplot Lib API Design
- plotting API - pyplot module
- Library - pylab module (useful function in Numpy and pyplot)
- plt.plot(x1,y1,x2,y2..., <attributes controls>)
- plt.bar
- plt.title(), .xlabel(),.ylabel()
- plt.gca() - set axes
- .setx_lim(), .set_ylim()
- plt.figure(<figsize>,<dpi>
- attributes control
- color
- b,g,m(megenta),w....
- type:
- \: solid,
- _: dashed,
- _. : dash_dot
- , : - dotted,
- None-nothing, ' '. "" - nothing_
- marker:
- o - circle
- v -triangle_down
- s-square
- p -pentagon
- * -star
- h-hexagon1
- +-plut
- D-diamond
- color
- plt.xlable(), ylable(), title(), legend([loc])
- subplots
- plt.subplot(<nrow><ncol><ind>, [color, maker..])
Pyplot Module: MATLAB-like interfaces
MatplotLib_Utils
- simpleTrainingCurves()
- to visualize training
Pandas Ploting
- <dataframe/data column/ data series>.plot([kind])
- return to plt directly
- use plt to set up arguments
- x, y
- kind
- bar, pie
- subplots = True/False
- default plot all columns together
- autopct = <format string>
- <df>.boxplot()
- 3 idioms returns different things
- <df>.plot(kind='hist')
- <df>.plot.hist()
- <df>.hist()
- 3 idioms returns different things
Seaborn
- .set_style(<style>)
- displot(<dist>), box_plot(), heatmap()