# Use this file in your python code by placing this file in the working # directory or the directory described in # https://matplotlib.org/3.3.1/tutorials/introductory/customizing.html#defining-your-own-style # Then, in your code do something like this: # # import matplotlib as mpl # import matplotlib.pyplot as plt # # with plt.style.context(('tex')): # plt.plot([0, 1], [2, 3]) # plt.savefig('fancy_plot.pdf') # # The resulting plot will be created using these values. You can use multiple # styles with a line like this: # # with plt.style.context(('tex', 'tex-fullwidth')): # # The second style overwrites anything in the first style. You can also make # individual adjustments to the style using something like this: # # with plt.style.context(('tex')): # with plt.rc_context(rc={'axes.titlesize': 'small'}): # # To include the resulting plot back in your tex file, just use # # \begin{figure} # \includegraphics{fancy_plot} # \caption{\label{fig:fancy_plot}Description goes here.} # \end{figure} # # Or, if you need a full-width plot, include it with # # \begin{figure*} # \includegraphics[width=\linewidth]{fancy_plot_wide} # \caption{\label{fig:fancy_plot_wide}Description goes here.} # \end{figure*} # # without any extra width, scaling, or crop directives. Also note that you can # automatically create multiple plots with something like this: # # for plot_style in [('tex', 'tex-fullwidth')), ('presentation')]: # with plt.style.context(plot_style): # plt.plot([0, 1], [2, 3]) # if plot_style[0] == 'presentation': # plt.savefig('fancy_plot_presentation.pdf') # else: # plt.savefig('fancy_plot.pdf') # # # The values in this file are appropriate for revtex. To adjust them for # different styles, place the \ShowDimensions definition found in the # accompanying show_dimensions.tex file in your tex file preamble, and then # place `\ShowDimensions` in the part of the text where you want to know the # dimensions — for example, in the text portion of a figure caption. When you # compile, the log will have lines starting with "The linewidth is", showing # you the relevant sizes. Use those numbers to set these numbers — for # example, the font size, family, etc. Note that matplotlib wants the figure # size in inches, so you'll need the standard conversion factor of 72.27 points # per inch. figure.figsize : 3.4039, 2.7 # Default to exact revtex column width (first argument), and aspect ratio 0.8 font.size : 9.0 font.family : serif font.serif : STIX2Text, STIXGeneral, TeX Gyre Termes, DejaVu Serif, Bitstream Vera Serif, Computer Modern Roman, New Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif font.sans-serif : STIXGeneral, TeX Gyre Termes, DejaVu Sans, Bitstream Vera Sans, Computer Modern Sans Serif, Lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, Avant Garde, sans-serif font.cursive : STIXGeneral, TeX Gyre Termes, Apple Chancery, Textile, Zapf Chancery, Sand, Script MT, Felipa, cursive font.monospace : STIXGeneral, TeX Gyre Termes, DejaVu Sans Mono, Bitstream Vera Sans Mono, Computer Modern Typewriter, Andale Mono, Nimbus Mono L, Courier New, Courier, Fixed, Terminal, monospace mathtext.fontset : stix text.usetex : False text.hinting : either axes.formatter.use_mathtext : True figure.dpi : 200 # Make these very small plots appear larger in the notebook; should not affect PDF output figure.autolayout : False figure.constrained_layout.use : True savefig.pad_inches : 0 savefig.format : pdf savefig.bbox : tight hist.bins : auto