acgc.figstyle API documentation

# acgc.figstyle

Style settings for matplotlib, for publication-ready figures

Activate the style by importing this module:

`from acgc import figstyle`

Figures generated by Matplotlib will then use the new style. The style includes grid lines (horizontal and vertical) by default. Turn these off and on with `grid_off` and `grid_on`:

`figstyle.grid_off()`

`figstyle.grid_on()`

View Source

      1#!/usr/bin/env python3
      2'''Style settings for matplotlib, for publication-ready figures
      3
      4Activate the style by importing this module:
      5
      6`from acgc import figstyle`
      7
      8Figures generated by Matplotlib will then use the new style.
      9The style includes grid lines (horizontal and vertical) by default.
     10Turn these off and on with `grid_off` and `grid_on`:
     11
     12`figstyle.grid_off()`
     13
     14`figstyle.grid_on()`
     15'''
     16
     17import os
     18import warnings
     19import matplotlib as mpl
     20import matplotlib.style as mstyle
     21import matplotlib.font_manager as mfonts
     22if 'inline' in mpl.get_backend():
     23    import matplotlib_inline
     24
     25# Path to this module
     26_PATH = os.path.dirname(__file__)
     27
     28def activate_style(grid=True,gridaxis='both',mathfont='regular'):
     29    '''Activate style sheet
     30
     31    Parameters
     32    ----------
     33    grid : bool, default=True
     34        turn grid lines on (True) or off (False)
     35    gridaxis : str, default='both'
     36        specifies which axes should have grid lines
     37    mathfont : str, default='regular'
     38        sets font used in mathtext, 'regular' uses same font as regular text.
     39        see `set_mathfont` for all options
     40    '''
     41    # Load settings from style file
     42    mstyle.use(os.path.join(_PATH,'acgc.mplstyle'))
     43
     44    # Set mathtext font
     45    set_mathfont(mathfont)
     46
     47    # Turn grid on or off
     48    if grid:
     49        grid_on(axis=gridaxis)
     50
     51    # Use high quality for inline images; Only use this if the inline backend is active
     52    # 'png' is default, 'svg' is also good
     53    if 'inline' in mpl.get_backend():
     54        matplotlib_inline.backend_inline.set_matplotlib_formats('retina')
     55
     56def deactivate_style():
     57    '''Restore rcParams prior to importing figstyle'''
     58    mpl.rcParams = rcParams_old
     59
     60def set_mathfont(fontname=None):
     61    '''Set the font used for typsetting math in Matplotlib
     62
     63    Parameters
     64    ----------
     65    fontname : str, default=None
     66        None         : Restore mathtext font to settings before importing figstyle
     67        'regular'    : Use same font as regular text in math expressions (default).
     68                       Same as using \mathregular or \mathdefault in math expressions.
     69                       Best for mixing regular and math text for superscripts and subscripts.
     70                       May lack or have poor positioning of some math symbols (e.g. integrals).
     71                       This will overwrite mathtext.bf, .bfit, .it, .rm in rcParams.
     72        'custom'     : Uses custom settings from rcParams (mathtext.bf, .bfit, .it, .rm)
     73        'cm'         : Computer Modern (i.e. LaTeX default)
     74        'stix'       : STIX serif
     75        'stixsans'   : STIX sans-serif; best for sans-serif math
     76        'dejavuserif': DejaVu Serif (not recommended)
     77        'dejavusans' : DejaVu Sans (not recommended)
     78    '''
     79
     80    # Check that input has an allowed value
     81    allowedvalues = ['None','regular','custom','cm','stix','stixsans','dejavusans','dejavuserif']
     82    if (fontname not in allowedvalues) and (fontname is not None):
     83        raise ValueError('Font name should be one of the allowed values: '+','.join(allowedvalues))
     84
     85    if fontname is None:
     86        # Restore old mathtext settings
     87        mpl.rcParams.update( {key:rcParams_old[key] for key in
     88                              ['mathtext.fontset','mathtext.bf','mathtext.bfit',
     89                               'mathtext.it','mathtext.rm']})
     90
     91    elif fontname == 'regular':
     92        # Set the math font to the font used for regular text
     93
     94        # Name of the text font
     95        textfont = mpl.rcParams[f'font.{mpl.rcParams["font.family"][0]:s}'][0]
     96        # Use the same font for math
     97        mpl.rcParams.update({'mathtext.fontset': 'custom',
     98                            'mathtext.bf'   : f'{textfont}:bold',
     99                            'mathtext.bfit' : f'{textfont}:italic:bold',
    100                            'mathtext.it'   : f'{textfont}:italic',
    101                            'mathtext.rm'   : f'{textfont}'})
    102    else:
    103        # Set the math font to the value provided
    104        mpl.rcParams['mathtext.fontset'] = fontname
    105
    106def grid_off():
    107    '''Turn off grid lines'''
    108    mpl.rcParams['axes.grid'] = False
    109
    110def grid_on(axis='both'):
    111    '''Turn on grid lines
    112
    113    Parameters
    114    ----------
    115    axis : {'both', 'x', 'y'}
    116        specifies which axes should have grid lines
    117    '''
    118    mpl.rcParams['axes.grid'] = True
    119    mpl.rcParams['axes.grid.axis'] = axis
    120
    121def load_fonts():
    122    '''Load fonts contained in the acgc/fonts subdirectory'''
    123
    124    # User fonts
    125    fonts_pylib = mfonts.findSystemFonts(os.path.join(_PATH,'fonts'))
    126
    127    # Cached fonts
    128    fonts_cached = mfonts.fontManager.ttflist
    129    fonts_cached_paths = [ font.fname for font in fonts_cached ]
    130
    131    # Add fonts that aren't already installed
    132    rebuild = False
    133    for font in fonts_pylib:
    134        if font not in fonts_cached_paths:
    135            if rebuild is False:
    136                # Issue warning, first time only
    137                warnings.warn('Rebuilding font cache. This can take time.')
    138            rebuild = True
    139            mfonts.fontManager.addfont(font)
    140
    141    # Save font cache
    142    if rebuild:
    143        cache = os.path.join(
    144                        mpl.get_cachedir(),
    145                        f'fontlist-v{mfonts.FontManager.__version__}.json'
    146                    )
    147        mfonts.json_dump(mfonts.fontManager, cache)
    148
    149###
    150rcParams_old = mpl.rcParams.copy()
    151load_fonts()
    152activate_style()

def activate_style(grid=True, gridaxis='both', mathfont='regular'): View Source

    29def activate_style(grid=True,gridaxis='both',mathfont='regular'):
    30    '''Activate style sheet
    31
    32    Parameters
    33    ----------
    34    grid : bool, default=True
    35        turn grid lines on (True) or off (False)
    36    gridaxis : str, default='both'
    37        specifies which axes should have grid lines
    38    mathfont : str, default='regular'
    39        sets font used in mathtext, 'regular' uses same font as regular text.
    40        see `set_mathfont` for all options
    41    '''
    42    # Load settings from style file
    43    mstyle.use(os.path.join(_PATH,'acgc.mplstyle'))
    44
    45    # Set mathtext font
    46    set_mathfont(mathfont)
    47
    48    # Turn grid on or off
    49    if grid:
    50        grid_on(axis=gridaxis)
    51
    52    # Use high quality for inline images; Only use this if the inline backend is active
    53    # 'png' is default, 'svg' is also good
    54    if 'inline' in mpl.get_backend():
    55        matplotlib_inline.backend_inline.set_matplotlib_formats('retina')

Activate style sheet

###### Parameters

- grid (bool, default=True): turn grid lines on (True) or off (False)
- gridaxis (str, default='both'): specifies which axes should have grid lines
- mathfont (str, default='regular'): sets font used in mathtext, 'regular' uses same font as regular text. see `set_mathfont` for all options

def deactivate_style(): View Source

    57def deactivate_style():
    58    '''Restore rcParams prior to importing figstyle'''
    59    mpl.rcParams = rcParams_old

Restore rcParams prior to importing figstyle

def set_mathfont(fontname=None): View Source

     61def set_mathfont(fontname=None):
     62    '''Set the font used for typsetting math in Matplotlib
     63
     64    Parameters
     65    ----------
     66    fontname : str, default=None
     67        None         : Restore mathtext font to settings before importing figstyle
     68        'regular'    : Use same font as regular text in math expressions (default).
     69                       Same as using \mathregular or \mathdefault in math expressions.
     70                       Best for mixing regular and math text for superscripts and subscripts.
     71                       May lack or have poor positioning of some math symbols (e.g. integrals).
     72                       This will overwrite mathtext.bf, .bfit, .it, .rm in rcParams.
     73        'custom'     : Uses custom settings from rcParams (mathtext.bf, .bfit, .it, .rm)
     74        'cm'         : Computer Modern (i.e. LaTeX default)
     75        'stix'       : STIX serif
     76        'stixsans'   : STIX sans-serif; best for sans-serif math
     77        'dejavuserif': DejaVu Serif (not recommended)
     78        'dejavusans' : DejaVu Sans (not recommended)
     79    '''
     80
     81    # Check that input has an allowed value
     82    allowedvalues = ['None','regular','custom','cm','stix','stixsans','dejavusans','dejavuserif']
     83    if (fontname not in allowedvalues) and (fontname is not None):
     84        raise ValueError('Font name should be one of the allowed values: '+','.join(allowedvalues))
     85
     86    if fontname is None:
     87        # Restore old mathtext settings
     88        mpl.rcParams.update( {key:rcParams_old[key] for key in
     89                              ['mathtext.fontset','mathtext.bf','mathtext.bfit',
     90                               'mathtext.it','mathtext.rm']})
     91
     92    elif fontname == 'regular':
     93        # Set the math font to the font used for regular text
     94
     95        # Name of the text font
     96        textfont = mpl.rcParams[f'font.{mpl.rcParams["font.family"][0]:s}'][0]
     97        # Use the same font for math
     98        mpl.rcParams.update({'mathtext.fontset': 'custom',
     99                            'mathtext.bf'   : f'{textfont}:bold',
    100                            'mathtext.bfit' : f'{textfont}:italic:bold',
    101                            'mathtext.it'   : f'{textfont}:italic',
    102                            'mathtext.rm'   : f'{textfont}'})
    103    else:
    104        # Set the math font to the value provided
    105        mpl.rcParams['mathtext.fontset'] = fontname

Set the font used for typsetting math in Matplotlib

###### Parameters

- fontname (str, default=None): None : Restore mathtext font to settings before importing figstyle 'regular' : Use same font as regular text in math expressions (default). Same as using \mathregular or \mathdefault in math expressions. Best for mixing regular and math text for superscripts and subscripts. May lack or have poor positioning of some math symbols (e.g. integrals). This will overwrite mathtext.bf, .bfit, .it, .rm in rcParams. 'custom' : Uses custom settings from rcParams (mathtext.bf, .bfit, .it, .rm) 'cm' : Computer Modern (i.e. LaTeX default) 'stix' : STIX serif 'stixsans' : STIX sans-serif; best for sans-serif math 'dejavuserif': DejaVu Serif (not recommended) 'dejavusans' : DejaVu Sans (not recommended)

def grid_off(): View Source

    107def grid_off():
    108    '''Turn off grid lines'''
    109    mpl.rcParams['axes.grid'] = False

Turn off grid lines

def grid_on(axis='both'): View Source

    111def grid_on(axis='both'):
    112    '''Turn on grid lines
    113
    114    Parameters
    115    ----------
    116    axis : {'both', 'x', 'y'}
    117        specifies which axes should have grid lines
    118    '''
    119    mpl.rcParams['axes.grid'] = True
    120    mpl.rcParams['axes.grid.axis'] = axis

Turn on grid lines

###### Parameters

- axis ({'both', 'x', 'y'}): specifies which axes should have grid lines

def load_fonts(): View Source

    122def load_fonts():
    123    '''Load fonts contained in the acgc/fonts subdirectory'''
    124
    125    # User fonts
    126    fonts_pylib = mfonts.findSystemFonts(os.path.join(_PATH,'fonts'))
    127
    128    # Cached fonts
    129    fonts_cached = mfonts.fontManager.ttflist
    130    fonts_cached_paths = [ font.fname for font in fonts_cached ]
    131
    132    # Add fonts that aren't already installed
    133    rebuild = False
    134    for font in fonts_pylib:
    135        if font not in fonts_cached_paths:
    136            if rebuild is False:
    137                # Issue warning, first time only
    138                warnings.warn('Rebuilding font cache. This can take time.')
    139            rebuild = True
    140            mfonts.fontManager.addfont(font)
    141
    142    # Save font cache
    143    if rebuild:
    144        cache = os.path.join(
    145                        mpl.get_cachedir(),
    146                        f'fontlist-v{mfonts.FontManager.__version__}.json'
    147                    )
    148        mfonts.json_dump(mfonts.fontManager, cache)

Load fonts contained in the acgc/fonts subdirectory

rcParams_old = RcParams({'_internal.classic_mode': False, 'agg.path.chunksize': 0, 'animation.bitrate': -1, 'animation.codec': 'h264', 'animation.convert_args': ['-layers', 'OptimizePlus'], 'animation.convert_path': 'convert', 'animation.embed_limit': 20.0, 'animation.ffmpeg_args': [], 'animation.ffmpeg_path': 'ffmpeg', 'animation.frame_format': 'png', 'animation.html': 'none', 'animation.writer': 'ffmpeg', 'axes.autolimit_mode': 'data', 'axes.axisbelow': 'line', 'axes.edgecolor': 'black', 'axes.facecolor': 'white', 'axes.formatter.limits': [-5, 6], 'axes.formatter.min_exponent': 0, 'axes.formatter.offset_threshold': 4, 'axes.formatter.use_locale': False, 'axes.formatter.use_mathtext': False, 'axes.formatter.useoffset': True, 'axes.grid': False, 'axes.grid.axis': 'both', 'axes.grid.which': 'major', 'axes.labelcolor': 'black', 'axes.labelpad': 4.0, 'axes.labelsize': 'medium', 'axes.labelweight': 'normal', 'axes.linewidth': 0.8, 'axes.prop_cycle': cycler('color', ['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf']), 'axes.spines.bottom': True, 'axes.spines.left': True, 'axes.spines.right': True, 'axes.spines.top': True, 'axes.titlecolor': 'auto', 'axes.titlelocation': 'center', 'axes.titlepad': 6.0, 'axes.titlesize': 'large', 'axes.titleweight': 'normal', 'axes.titley': None, 'axes.unicode_minus': True, 'axes.xmargin': 0.05, 'axes.ymargin': 0.05, 'axes.zmargin': 0.05, 'axes3d.grid': True, 'axes3d.xaxis.panecolor': (0.95, 0.95, 0.95, 0.5), 'axes3d.yaxis.panecolor': (0.9, 0.9, 0.9, 0.5), 'axes3d.zaxis.panecolor': (0.925, 0.925, 0.925, 0.5), 'backend': 'MacOSX', 'backend_fallback': True, 'boxplot.bootstrap': None, 'boxplot.boxprops.color': 'black', 'boxplot.boxprops.linestyle': '-', 'boxplot.boxprops.linewidth': 1.0, 'boxplot.capprops.color': 'black', 'boxplot.capprops.linestyle': '-', 'boxplot.capprops.linewidth': 1.0, 'boxplot.flierprops.color': 'black', 'boxplot.flierprops.linestyle': 'none', 'boxplot.flierprops.linewidth': 1.0, 'boxplot.flierprops.marker': 'o', 'boxplot.flierprops.markeredgecolor': 'black', 'boxplot.flierprops.markeredgewidth': 1.0, 'boxplot.flierprops.markerfacecolor': 'none', 'boxplot.flierprops.markersize': 6.0, 'boxplot.meanline': False, 'boxplot.meanprops.color': 'C2', 'boxplot.meanprops.linestyle': '--', 'boxplot.meanprops.linewidth': 1.0, 'boxplot.meanprops.marker': '^', 'boxplot.meanprops.markeredgecolor': 'C2', 'boxplot.meanprops.markerfacecolor': 'C2', 'boxplot.meanprops.markersize': 6.0, 'boxplot.medianprops.color': 'C1', 'boxplot.medianprops.linestyle': '-', 'boxplot.medianprops.linewidth': 1.0, 'boxplot.notch': False, 'boxplot.patchartist': False, 'boxplot.showbox': True, 'boxplot.showcaps': True, 'boxplot.showfliers': True, 'boxplot.showmeans': False, 'boxplot.vertical': True, 'boxplot.whiskerprops.color': 'black', 'boxplot.whiskerprops.linestyle': '-', 'boxplot.whiskerprops.linewidth': 1.0, 'boxplot.whiskers': 1.5, 'contour.algorithm': 'mpl2014', 'contour.corner_mask': True, 'contour.linewidth': None, 'contour.negative_linestyle': 'dashed', 'date.autoformatter.day': '%Y-%m-%d', 'date.autoformatter.hour': '%m-%d %H', 'date.autoformatter.microsecond': '%M:%S.%f', 'date.autoformatter.minute': '%d %H:%M', 'date.autoformatter.month': '%Y-%m', 'date.autoformatter.second': '%H:%M:%S', 'date.autoformatter.year': '%Y', 'date.converter': 'auto', 'date.epoch': '1970-01-01T00:00:00', 'date.interval_multiples': True, 'docstring.hardcopy': False, 'errorbar.capsize': 0.0, 'figure.autolayout': False, 'figure.constrained_layout.h_pad': 0.04167, 'figure.constrained_layout.hspace': 0.02, 'figure.constrained_layout.use': False, 'figure.constrained_layout.w_pad': 0.04167, 'figure.constrained_layout.wspace': 0.02, 'figure.dpi': 100.0, 'figure.edgecolor': 'white', 'figure.facecolor': 'white', 'figure.figsize': [6.4, 4.8], 'figure.frameon': True, 'figure.hooks': [], 'figure.labelsize': 'large', 'figure.labelweight': 'normal', 'figure.max_open_warning': 20, 'figure.raise_window': True, 'figure.subplot.bottom': 0.11, 'figure.subplot.hspace': 0.2, 'figure.subplot.left': 0.125, 'figure.subplot.right': 0.9, 'figure.subplot.top': 0.88, 'figure.subplot.wspace': 0.2, 'figure.titlesize': 'large', 'figure.titleweight': 'normal', 'font.cursive': ['Apple Chancery', 'Textile', 'Zapf Chancery', 'Sand', 'Script MT', 'Felipa', 'Comic Neue', 'Comic Sans MS', 'cursive'], 'font.family': ['sans-serif'], 'font.fantasy': ['Chicago', 'Charcoal', 'Impact', 'Western', 'xkcd script', 'fantasy'], 'font.monospace': ['DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Computer Modern Typewriter', 'Andale Mono', 'Nimbus Mono L', 'Courier New', 'Courier', 'Fixed', 'Terminal', 'monospace'], 'font.sans-serif': ['DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', 'sans-serif'], 'font.serif': ['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.size': 10.0, 'font.stretch': 'normal', 'font.style': 'normal', 'font.variant': 'normal', 'font.weight': 'normal', 'grid.alpha': 1.0, 'grid.color': '#b0b0b0', 'grid.linestyle': '-', 'grid.linewidth': 0.8, 'hatch.color': 'black', 'hatch.linewidth': 1.0, 'hist.bins': 10, 'image.aspect': 'equal', 'image.cmap': 'viridis', 'image.composite_image': True, 'image.interpolation': 'antialiased', 'image.lut': 256, 'image.origin': 'upper', 'image.resample': True, 'interactive': False, 'keymap.back': ['left', 'c', 'backspace', 'MouseButton.BACK'], 'keymap.copy': ['ctrl+c', 'cmd+c'], 'keymap.forward': ['right', 'v', 'MouseButton.FORWARD'], 'keymap.fullscreen': ['f', 'ctrl+f'], 'keymap.grid': ['g'], 'keymap.grid_minor': ['G'], 'keymap.help': ['f1'], 'keymap.home': ['h', 'r', 'home'], 'keymap.pan': ['p'], 'keymap.quit': ['ctrl+w', 'cmd+w', 'q'], 'keymap.quit_all': [], 'keymap.save': ['s', 'ctrl+s'], 'keymap.xscale': ['k', 'L'], 'keymap.yscale': ['l'], 'keymap.zoom': ['o'], 'legend.borderaxespad': 0.5, 'legend.borderpad': 0.4, 'legend.columnspacing': 2.0, 'legend.edgecolor': '0.8', 'legend.facecolor': 'inherit', 'legend.fancybox': True, 'legend.fontsize': 'medium', 'legend.framealpha': 0.8, 'legend.frameon': True, 'legend.handleheight': 0.7, 'legend.handlelength': 2.0, 'legend.handletextpad': 0.8, 'legend.labelcolor': 'None', 'legend.labelspacing': 0.5, 'legend.loc': 'best', 'legend.markerscale': 1.0, 'legend.numpoints': 1, 'legend.scatterpoints': 1, 'legend.shadow': False, 'legend.title_fontsize': None, 'lines.antialiased': True, 'lines.color': 'C0', 'lines.dash_capstyle': <CapStyle.butt: 'butt'>, 'lines.dash_joinstyle': <JoinStyle.round: 'round'>, 'lines.dashdot_pattern': [6.4, 1.6, 1.0, 1.6], 'lines.dashed_pattern': [3.7, 1.6], 'lines.dotted_pattern': [1.0, 1.65], 'lines.linestyle': '-', 'lines.linewidth': 1.5, 'lines.marker': 'None', 'lines.markeredgecolor': 'auto', 'lines.markeredgewidth': 1.0, 'lines.markerfacecolor': 'auto', 'lines.markersize': 6.0, 'lines.scale_dashes': True, 'lines.solid_capstyle': <CapStyle.projecting: 'projecting'>, 'lines.solid_joinstyle': <JoinStyle.round: 'round'>, 'macosx.window_mode': 'system', 'markers.fillstyle': 'full', 'mathtext.bf': 'sans:bold', 'mathtext.bfit': 'sans:italic:bold', 'mathtext.cal': 'cursive', 'mathtext.default': 'it', 'mathtext.fallback': 'cm', 'mathtext.fontset': 'dejavusans', 'mathtext.it': 'sans:italic', 'mathtext.rm': 'sans', 'mathtext.sf': 'sans', 'mathtext.tt': 'monospace', 'patch.antialiased': True, 'patch.edgecolor': 'black', 'patch.facecolor': 'C0', 'patch.force_edgecolor': False, 'patch.linewidth': 1.0, 'path.effects': [], 'path.simplify': True, 'path.simplify_threshold': 0.111111111111, 'path.sketch': None, 'path.snap': True, 'pcolor.shading': 'auto', 'pcolormesh.snap': True, 'pdf.compression': 6, 'pdf.fonttype': 3, 'pdf.inheritcolor': False, 'pdf.use14corefonts': False, 'pgf.preamble': '', 'pgf.rcfonts': True, 'pgf.texsystem': 'xelatex', 'polaraxes.grid': True, 'ps.distiller.res': 6000, 'ps.fonttype': 3, 'ps.papersize': 'letter', 'ps.useafm': False, 'ps.usedistiller': None, 'savefig.bbox': None, 'savefig.directory': '~', 'savefig.dpi': 'figure', 'savefig.edgecolor': 'auto', 'savefig.facecolor': 'auto', 'savefig.format': 'png', 'savefig.orientation': 'portrait', 'savefig.pad_inches': 0.1, 'savefig.transparent': False, 'scatter.edgecolors': 'face', 'scatter.marker': 'o', 'svg.fonttype': 'path', 'svg.hashsalt': None, 'svg.image_inline': True, 'text.antialiased': True, 'text.color': 'black', 'text.hinting': 'force_autohint', 'text.hinting_factor': 8, 'text.kerning_factor': 0, 'text.latex.preamble': '', 'text.parse_math': True, 'text.usetex': False, 'timezone': 'UTC', 'tk.window_focus': False, 'toolbar': 'toolbar2', 'webagg.address': '127.0.0.1', 'webagg.open_in_browser': True, 'webagg.port': 8988, 'webagg.port_retries': 50, 'xaxis.labellocation': 'center', 'xtick.alignment': 'center', 'xtick.bottom': True, 'xtick.color': 'black', 'xtick.direction': 'out', 'xtick.labelbottom': True, 'xtick.labelcolor': 'inherit', 'xtick.labelsize': 'medium', 'xtick.labeltop': False, 'xtick.major.bottom': True, 'xtick.major.pad': 3.5, 'xtick.major.size': 3.5, 'xtick.major.top': True, 'xtick.major.width': 0.8, 'xtick.minor.bottom': True, 'xtick.minor.ndivs': 'auto', 'xtick.minor.pad': 3.4, 'xtick.minor.size': 2.0, 'xtick.minor.top': True, 'xtick.minor.visible': False, 'xtick.minor.width': 0.6, 'xtick.top': False, 'yaxis.labellocation': 'center', 'ytick.alignment': 'center_baseline', 'ytick.color': 'black', 'ytick.direction': 'out', 'ytick.labelcolor': 'inherit', 'ytick.labelleft': True, 'ytick.labelright': False, 'ytick.labelsize': 'medium', 'ytick.left': True, 'ytick.major.left': True, 'ytick.major.pad': 3.5, 'ytick.major.right': True, 'ytick.major.size': 3.5, 'ytick.major.width': 0.8, 'ytick.minor.left': True, 'ytick.minor.ndivs': 'auto', 'ytick.minor.pad': 3.4, 'ytick.minor.right': True, 'ytick.minor.size': 2.0, 'ytick.minor.visible': False, 'ytick.minor.width': 0.6, 'ytick.right': False})