Skip to content

sujunyan/pyplot-gallery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My pyplot-gallery

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.

General Tips

The text styles (font size, font family, etc.) of IEEE templates are here and of ACM templates are here.

Font size

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.

Figure size

  • 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.

Others

  • 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=2 in the lineplot for better presentation.

Illustrations

Figure 1 [SRC]

Figure 2 [SRC]

Figure 3 [SRC]

Figure 4 [SRC]

Figure 5 [SRC]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages