.. _configuration: .. public pygeostat Configuration ####################### Various utilities to configure the behaviour of pygeostat functions and to save project-specific defaults across files or between sessions. .. _gsParams: gsParams ======== .. autoclass:: pygeostat.GsParams.GsParams Find All -------- .. automethod:: pygeostat.GsParams.GsParams.find_all Restore Defaults ---------------- .. automethod:: pygeostat.GsParams.GsParams.restore_defaults Describe -------- .. automethod:: pygeostat.GsParams.GsParams.describe Save ---- .. automethod:: pygeostat.GsParams.GsParams.save Load ---- .. automethod:: pygeostat.GsParams.GsParams.load Reset System Default -------------------- .. automethod:: pygeostat.GsParams.GsParams.reset_systemdefault Set System Default ------------------ .. automethod:: pygeostat.GsParams.GsParams.set_systemdefault Get System Default ------------------ .. automethod:: pygeostat.GsParams.GsParams.get_systemdefault gsParam Descriptions ==================== .. exec:: from pygeostat.GsParams import paramsDescript, defaultParams sections = ["config", "plotting", "data"] for sec in sections: # section header print("{}".format(sec.capitalize())) print('-' * len(sec)) # iterate through the keys, and print those associated with this section for param, description in paramsDescript.items(): if param.startswith(sec): # key header print(param) print('+' * len(param)) # get the default value and the function name to get the expected types defaultval, func = defaultParams[param] funcname = func.__name__ types = [x for x in funcname.split("_") if x not in ("", "validate", "or")] if "string" in types and isinstance(defaultval, str): defaultval = '"{}"'.format(defaultval) # print the expected type, default then description for this param print("Expected Type: ``{}``, Default: ``{}``\n".format(", ".join(types), defaultval)) print(description + "\n") .. _gsPlotStyle: gsPlotStyle =========== .. autoclass:: pygeostat.plotting.set_style.DefaultPlotStyles Restore Defaults ---------------- .. automethod:: pygeostat.plotting.set_style.DefaultPlotStyles.restore_defaults Get System Default ------------------ .. automethod:: pygeostat.plotting.set_style.DefaultPlotStyles.get_systemdefault Load from File -------------- .. automethod:: pygeostat.plotting.set_style.DefaultPlotStyles.load Reset Default Styles -------------------- .. automethod:: pygeostat.plotting.set_style.DefaultPlotStyles.reset_systemdefault Save to File ------------ .. automethod:: pygeostat.plotting.set_style.DefaultPlotStyles.save Save System Defaults -------------------- .. automethod:: pygeostat.plotting.set_style.DefaultPlotStyles.set_systemdefault Update MPL RcParams From Current Style -------------------------------------- .. automethod:: pygeostat.plotting.set_style.DefaultPlotStyles.update_mplrcParams gsPlotStyle Custom Styles ========================= .. code-block:: Python darkcontent = { 'axes.axisbelow': True, 'axes.edgecolor': 'white', 'axes.facecolor': 'black', 'axes.grid': False, 'axes.labelcolor': 'white', 'axes.labelsize': 8, 'axes.linewidth': 0.5, 'axes.titlesize': 8, 'figure.figsize': (3, 3), 'figure.subplot.bottom': 0.125, 'figure.facecolor': 'black', 'figure.edgecolor': 'black', 'font.family': 'Calibri', 'font.size': 8, 'font.weight': 400, 'text.color': 'white', 'grid.color': 'lightgray', 'grid.linestyle': '-', 'grid.linewidth': 0.5, 'legend.fontsize': 8.0, 'legend.frameon': False, 'legend.numpoints': 1, 'legend.scatterpoints': 1, 'lines.linewidth': 1.5, 'lines.markeredgewidth': 0, 'lines.markersize': 7, 'lines.solid_capstyle': 'round', 'patch.linewidth': 0.3, 'pdf.fonttype': 3, 'ps.fonttype': 3, 'ps.useafm': True, 'xtick.color': 'white', 'xtick.direction': 'out', 'xtick.labelsize': 8, 'xtick.major.pad': 3, 'xtick.major.width': 1, 'xtick.major.size': 0, 'xtick.minor.width': 0.5, 'xtick.minor.size': 0, 'ytick.color': 'white', 'ytick.direction': 'out', 'ytick.labelsize': 8, 'ytick.major.pad': 3, 'ytick.major.width': 1, 'ytick.major.size': 0, 'ytick.minor.width': 0.5, 'ytick.minor.size': 0 } ccgpaper = { 'axes.axisbelow': True, 'axes.edgecolor': 'black', 'axes.facecolor': 'white', 'axes.grid': False, 'axes.labelcolor': 'black', 'axes.labelsize': 8, 'axes.linewidth': 0.5, 'axes.titlesize': 8, 'figure.figsize': (3, 3), 'figure.subplot.bottom': 0.125, 'figure.facecolor': 'white', 'figure.edgecolor': 'black', 'font.family': 'Calibri', 'font.size': 8, 'font.weight': 400, 'text.color': 'black', 'grid.color': 'lightgray', 'grid.linestyle': '-', 'grid.linewidth': 0.5, 'legend.fontsize': 8.0, 'legend.frameon': False, 'legend.numpoints': 1, 'legend.scatterpoints': 1, 'lines.linewidth': 1.5, 'lines.markeredgewidth': 0, 'lines.markersize': 7, 'lines.solid_capstyle': 'round', 'patch.linewidth': 0.3, 'pdf.fonttype': 3, 'ps.fonttype': 3, 'ps.useafm': True, 'xtick.color': 'black', 'xtick.direction': 'out', 'xtick.labelsize': 8, 'xtick.major.pad': 3, 'xtick.major.width': 1, 'xtick.major.size': 0, 'xtick.minor.width': 0.5, 'xtick.minor.size': 0, 'ytick.color': 'black', 'ytick.direction': 'out', 'ytick.labelsize': 8, 'ytick.major.pad': 3, 'ytick.major.width': 1, 'ytick.major.size': 0, 'ytick.minor.width': 0.5, 'ytick.minor.size': 0 } presentation = { 'axes.axisbelow': True, 'axes.edgecolor': 'black', 'axes.facecolor': 'white', 'axes.grid': False, 'axes.labelcolor': 'black', 'axes.labelsize': 8, 'axes.linewidth': 0.5, 'axes.titlesize': 8, 'figure.figsize': (8, 8), 'figure.subplot.bottom': 0.125, 'figure.facecolor': 'white', 'figure.edgecolor': 'black', 'figure.dpi': 150, 'savefig.dpi': 150, 'font.family': 'Calibri', 'font.size': 12, 'font.weight': 400, 'text.color': 'black', 'grid.color': 'lightgray', 'grid.linestyle': '-', 'grid.linewidth': 0.5, 'legend.fontsize': 8.0, 'legend.frameon': False, 'legend.numpoints': 1, 'legend.scatterpoints': 1, 'lines.linewidth': 1.5, 'lines.markeredgewidth': 0, 'lines.markersize': 5, 'lines.solid_capstyle': 'round', 'patch.linewidth': 0.3, 'pdf.fonttype': 3, 'ps.fonttype': 3, 'ps.useafm': True, 'xtick.color': 'black', 'xtick.direction': 'out', 'xtick.labelsize': 8, 'xtick.major.pad': 3, 'xtick.major.width': 1, 'xtick.major.size': 0, 'xtick.minor.width': 0.5, 'xtick.minor.size': 0, 'ytick.color': 'black', 'ytick.direction': 'out', 'ytick.labelsize': 8, 'ytick.major.pad': 3, 'ytick.major.width': 1, 'ytick.major.size': 0, 'ytick.minor.width': 0.5, 'ytick.minor.size': 0 } jdplots = { 'axes.axisbelow': True, 'axes.edgecolor': 'k', 'axes.facecolor': 'white', 'axes.grid': False, 'axes.labelcolor': 'k', 'axes.labelsize': 'medium', 'axes.linewidth': 1.0, 'axes.titlesize': 'large', 'figure.figsize': (7, 5), 'figure.subplot.bottom': 0.125, 'figure.facecolor': 'white', 'figure.edgecolor': 'white', 'font.family': 'sans-serif', 'font.size': 12.0, 'font.weight': 'medium', 'grid.color': 'lightgray', 'grid.linestyle': '-', 'grid.linewidth': 0.5, 'legend.fontsize': 'medium', 'legend.frameon': False, 'legend.numpoints': 1, 'legend.scatterpoints': 1, 'lines.linewidth': 1.0, 'lines.markeredgewidth': 0.25, 'lines.markersize': 6, 'lines.solid_capstyle': 'round', 'patch.linewidth': 0.3, 'pdf.fonttype': 3, 'ps.fonttype': 3, 'ps.useafm': False, 'text.color': 'k', 'xtick.color': 'k', 'xtick.direction': 'in', 'xtick.labelsize': 'medium', 'xtick.major.pad': 4, 'xtick.major.width': 0.5, 'xtick.major.size': 4, 'xtick.minor.width': 0.5, 'xtick.minor.size': 0, 'ytick.color': 'k', 'ytick.direction': 'in', 'ytick.labelsize': 'medium', 'ytick.major.pad': 4, 'ytick.major.width': 0.5, 'ytick.major.size': 4, 'ytick.minor.width': 0.5, 'ytick.minor.size': 0 } Pygeostat Plotting Style Decorator ================================== .. autofunction:: pygeostat.plotting.set_style.pygeopltstyle