User Tools

Site Tools


other:python:jyp_steps

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
other:python:jyp_steps [2019/05/29 10:55] – [Matplotlib] details for subplots_adjust jypeterother:python:jyp_steps [2019/05/29 11:54] – [Useful reference pages] jypeter
Line 217: Line 217:
   - Download the [[http://matplotlib.org/contents.html|pdf version of the manual]]. **Do not print** the 2800+ pages of the manual! Read the beginner's guide (Chapter //FIVE// of //Part II//) and have a super quick look at the table of contents of the whole document.   - Download the [[http://matplotlib.org/contents.html|pdf version of the manual]]. **Do not print** the 2800+ pages of the manual! Read the beginner's guide (Chapter //FIVE// of //Part II//) and have a super quick look at the table of contents of the whole document.
  
-==== Useful reference pages ====+==== Useful matplotlib reference pages ====
  
   * [[https://matplotlib.org/api/_as_gen/matplotlib.pyplot.plot.html|plot(...)]]: Plot y versus x as lines and/or markers   * [[https://matplotlib.org/api/_as_gen/matplotlib.pyplot.plot.html|plot(...)]]: Plot y versus x as lines and/or markers
Line 242: Line 242:
       * if the legend is outside of the plot, you have to **explicitly provide enough space for the legend on the page**       * if the legend is outside of the plot, you have to **explicitly provide enough space for the legend on the page**
         * e.g. with [[https://matplotlib.org/api/_as_gen/matplotlib.pyplot.subplots_adjust.html|subplots_adjust]], ''plt.subplots_adjust(right=0.75)'' will make all the plots use 75% on the left of the page, and leave 25% on the right for the legend         * e.g. with [[https://matplotlib.org/api/_as_gen/matplotlib.pyplot.subplots_adjust.html|subplots_adjust]], ''plt.subplots_adjust(right=0.75)'' will make all the plots use 75% on the left of the page, and leave 25% on the right for the legend
 +  * The [[https://matplotlib.org/api/_as_gen/matplotlib.figure.Figure.html|figure(...)]] and the associated methods
 +  * The [[https://matplotlib.org/api/axes_api.html|axes]] and the associated methods
 +  * [[https://matplotlib.org/tutorials/introductory/customizing.html#matplotlib-rcparams|matplotlib default settings]] can be queried and updated
 +    * example: the default figure size (inches) is ''mpl.rcParams['figure.figsize']'' (''[6.4, 4.8]'')
 +    * current settings' file:  ''mpl.matplotlib_fname()''
  
 ==== Misc Matplotlib tricks ==== ==== Misc Matplotlib tricks ====
other/python/jyp_steps.txt · Last modified: 2025/02/26 11:40 by jypeter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki