getdist.plots.GetDistPlotSettings¶
- class getdist.plots.GetDistPlotSettings(subplot_size_inch: float = 2, fig_width_inch: Optional[float] = None)[source]¶
Settings class (colors, sizes, font, styles etc.)
- Variables
alpha_factor_contour_lines – alpha factor for adding contour lines between filled contours
alpha_filled_add – alpha for adding filled contours to a plot
axes_fontsize – Size for axis font at reference axis size
axes_labelsize – Size for axis label font at reference axis size
axis_marker_color – The color for a marker
axis_marker_ls – The line style for a marker
axis_marker_lw – The line width for a marker
axis_tick_powerlimits – exponents at which to use scientific notation for axis tick labels
axis_tick_max_labels – maximum number of tick labels per axis
axis_tick_step_groups – steps to try for axis ticks, in grouped in order of preference
axis_tick_x_rotation – The rotation for the x tick label in degrees
axis_tick_y_rotation – The rotation for the y tick label in degrees
colorbar_axes_fontsize – size for tick labels on colorbar (None for default to match axes font size)
colorbar_label_pad – padding for the colorbar label
colorbar_label_rotation – angle to rotate colorbar label (set to zero if -90 default gives layout problem)
colorbar_tick_rotation – angle to rotate colorbar tick labels
colormap – a Matplotlib color map for shading
colormap_scatter – a Matplotlib color map for 3D scatter plots
constrained_layout – use matplotlib’s constrained-layout to fit plots within the figure and avoid overlaps.
fig_width_inch – The width of the figure in inches
figure_legend_frame – draw box around figure legend
figure_legend_loc – The location for the figure legend
figure_legend_ncol – number of columns for figure legend (set to zero to use defaults)
fontsize – font size for text (and ultimate fallback when others not set)
legend_colored_text – use colored text for legend labels rather than separate color blocks
legend_fontsize – The font size for the legend (defaults to fontsize)
legend_frac_subplot_margin – fraction of subplot size to use for spacing figure legend above plots
legend_frame – draw box around legend
legend_loc – The location for the legend
legend_rect_border – whether to have black border around solid color boxes in legends
line_dash_styles – dict mapping line styles to detailed dash styles, default: {’–’: (3, 2), ‘-.’: (4, 1, 1, 1)}
line_labels – True if you want to automatically add legends when adding more than one line to subplots
line_styles – list of default line styles/colors ([‘-k’, ‘-r’, ‘–C0’, …]) or name of a standard colormap (e.g. tab10), or a list of tuples of line styles and colors for each line
linewidth – relative linewidth (at reference size)
linewidth_contour – linewidth for lines in filled contours
linewidth_meanlikes – linewidth for mean likelihood lines
no_triangle_axis_labels – whether subplots in triangle plots should show axis labels if not at the edge
norm_1d_density – whether to normolize 1D densities (otherwise normalized to unit peak value)
norm_prob_label – label for the y axis in normalized 1D density plots
num_plot_contours – number of contours to plot in 2D plots (up to number of contours in analysis settings)
num_shades – number of distinct colors to use for shading shaded 2D plots
param_names_for_labels – file name of .paramnames file to use for overriding parameter labels for plotting
plot_args – dict, or list of dicts, giving settings like color, ls, alpha, etc. to apply for a plot or each line added
plot_meanlikes – include mean likelihood lines in 1D plots
prob_label – label for the y axis in unnormalized 1D density plots
prob_y_ticks – show ticks on y axis for 1D density plots
progress – write out some status
scaling – True to scale down fonts and lines for smaller subplots; False to use fixed sizes.
scaling_max_axis_size – font sizes will only be scaled for subplot widths (in inches) smaller than this.
scaling_factor – factor by which to multiply the difference of the axis size to the reference size when scaling font sizes
scaling_reference_size – axis width (in inches) at which font sizes are specified.
direct_scaling – True to directly scale the font size with the axis size for small axes (can be very small)
scatter_size – size of points in “3D” scatter plots
shade_level_scale – shading contour colors are put at [0:1:spacing]**shade_level_scale
shade_meanlikes – 2D shading uses mean likelihoods rather than marginalized density
solid_colors – List of default colors for filled 2D plots or the name of a colormap (e.g. tab10). If a list, each element is either a color, or a tuple of values for different contour levels.
solid_contour_palefactor – factor by which to make 2D outer filled contours paler when only specifying one contour color
subplot_size_ratio – ratio of width and height of subplots
tight_layout – use tight_layout to layout, avoid overlaps and remove white space; if it doesn’t work try constrained_layout. If true it is applied when calling
finish_plot()
(which is called automatically by plots_xd(), triangle_plot and rectangle_plot).title_limit – show parameter limits over 1D plots, 1 for first limit (68% default), 2 second, etc.
title_limit_labels – whether or not to include parameter label when adding limits above 1D plots
title_limit_fontsize – font size to use for limits in plot titles (defaults to axes_labelsize)
If fig_width_inch set, fixed setting for fixed total figure size in inches. Otherwise, use subplot_size_inch to determine default font sizes etc., and figure will then be as wide as necessary to show all subplots at specified size.
- Parameters
subplot_size_inch – Determines the size of subplots, and hence default font sizes
fig_width_inch – The width of the figure in inches, If set, forces fixed total size.
- __init__(subplot_size_inch: float = 2, fig_width_inch: Optional[float] = None)[source]¶
If fig_width_inch set, fixed setting for fixed total figure size in inches. Otherwise, use subplot_size_inch to determine default font sizes etc., and figure will then be as wide as necessary to show all subplots at specified size.
- Parameters
subplot_size_inch – Determines the size of subplots, and hence default font sizes
fig_width_inch – The width of the figure in inches, If set, forces fixed total size.
Methods
__init__
([subplot_size_inch, fig_width_inch])If fig_width_inch set, fixed setting for fixed total figure size in inches.
rc_sizes
([axes_fontsize, lab_fontsize, ...])Sets the font sizes by default from matplotlib.rcParams defaults
scaled_fontsize
(ax_size, var[, default])scaled_linewidth
(ax_size, linewidth)set_with_subplot_size
([size_inch, size_mm, ...])Sets the subplot's size, either in inches or in millimeters.