This is a small gallery of pyplot examples. Hopefully I can retrieve the sample codes and save some time in the future. Take a quick look at the following illustrations to see available samples.
In addition, the file style.py contains useful functions to (globally) change the style for scientific publication LaTeX templates.
The text styles (font size, font family, etc.) of IEEE templates are here and of ACM templates are here.
The font size of figure caption in ACM template is 9pt and the font size caption in IEEE template is 8pt. We can use the command
matplotlib.rc("font", size=9)
to globally change the font size of all figures.
- For IEEE templates, the single column width is 7.25 inches. For double column width, each column's width is 3.5 inches.
- For ACM two-comlumn templates, each column's width is 3.33 inches.
We can use the command
fig.set_size_inches(3.5, 2)
to change the figure size. Note that the hight of the figure might need to be adjusted case by case.
- We can use the command
matplotlib.rc("text", usetex=true)to use TeX engine to render the figure. But we need to have LaTeX engine installed in the computer. - I also define some colors in the file style.py.
- We may use larger linewidth, e.g.,
linewidth=2in the lineplot for better presentation.




