Skip to content Skip to sidebar Skip to footer

Seaborn Rc Parameters For Set_context And Set_style

In the tutorial for setting up the aesthetics of your plots, there are a few different methods: set_style set_context axes_style Each one of these accepts an rc keyword parameter

Solution 1:

It would appear that the answer is 'none of the above'. The valid keys for set_style and set_context are listed here:

_style_keys = [
    "axes.facecolor", "axes.edgecolor",
    "axes.grid", "axes.axisbelow", "axes.labelcolor",

    "figure.facecolor", "grid.color", 
    "grid.linestyle", "text.color",

    "xtick.color", "ytick.color",
    "xtick.direction", "ytick.direction", 
    "lines.solid_capstyle",

    "patch.edgecolor", "patch.force_edgecolor",

    "image.cmap", "font.family", "font.sans-serif",

    "xtick.bottom", "xtick.top",
    "ytick.left", "ytick.right",

    "axes.spines.left", "axes.spines.bottom",
    "axes.spines.right", "axes.spines.top",]

_context_keys = [
    "font.size", "axes.labelsize",
    "axes.titlesize", "xtick.labelsize",
    "ytick.labelsize", "legend.fontsize",

    "axes.linewidth", "grid.linewidth",
    "lines.linewidth", "lines.markersize",
    "patch.linewidth",

    "xtick.major.width", "ytick.major.width",
    "xtick.minor.width", "ytick.minor.width",

    "xtick.major.size", "ytick.major.size",
    "xtick.minor.size", "ytick.minor.size",]

Also note that set_style is just a convenience function which calls axes_style.

So you will have to use matplotlib.rcParams, although if the typical rcParams['figure.figsize'] = [16,10] syntax is not amenable you could of course create your own style.

Post a Comment for "Seaborn Rc Parameters For Set_context And Set_style"