getdist.plots.GetDistPlotter¶
-
class
getdist.plots.
GetDistPlotter
(plot_data=None, chain_dir=None, settings=None, analysis_settings=None, mcsamples=True)[source]¶ Main class for making plots from one or more sets of samples.
Variables: - settings – a
GetDistPlotSettings
instance with settings - subplots – a 2D array of
Axes
for subplots - sampleAnalyser – a
MCSampleAnalysis
instance for gettingMCSamples
and derived data from a given root name tag (e.g. sampleAnalyser.samplesForRoot(‘rootname’))
Parameters: - plot_data – (deprecated) directory name if you have pre-computed plot_data/ directory from GetDist; None by default
- chain_dir – Set this to a directory or grid root to search for chains (can also be a list of such, searched in order)
- analysis_settings – The settings to be used by
MCSampleAnalysis
when analysing samples - mcsamples – if True defaults to current method of using
MCSampleAnalysis
instance to analyse chains on demand
-
__init__
(plot_data=None, chain_dir=None, settings=None, analysis_settings=None, mcsamples=True)[source]¶ Parameters: - plot_data – (deprecated) directory name if you have pre-computed plot_data/ directory from GetDist; None by default
- chain_dir – Set this to a directory or grid root to search for chains (can also be a list of such, searched in order)
- analysis_settings – The settings to be used by
MCSampleAnalysis
when analysing samples - mcsamples – if True defaults to current method of using
MCSampleAnalysis
instance to analyse chains on demand
Methods
__init__
([plot_data, chain_dir, settings, …])param plot_data: (deprecated) directory name if you have pre-computed plot_data/ directory from GetDist; None by default add_1d
(root, param[, plotno, normalized, ax])Low-level function to add a 1D marginalized density line to a plot add_2D_covariance
(means, cov[, xvals, …])Plot 2D Gaussian ellipse. add_2D_mixture_projection
(mixture, param1, …)add_2d_contours
(root[, param1, param2, …])Low-level function to add 2D contours to plot for samples with given root name and parameters add_2d_density_contours
(density, **kwargs)Low-level function to add 2D contours to a plot using provided density add_2d_scatter
(root, x, y[, color, alpha, …])Low-level function to adds a 2D sample scatter plot to the current axes (or ax if specified). add_2d_shading
(root, param1, param2[, …])Low-level function to add 2D density shading to the given plot. add_3d_scatter
(root, params[, color_bar, …])Low-level function to add a 3D scatter plot to the current axes (or ax if specified). add_colorbar
(param[, orientation, mappable, ax])Adds a color bar to the given plot. add_colorbar_label
(cb, param[, label_rotation])Adds a color bar label. add_legend
(legend_labels[, legend_loc, …])Add a legend to the axes or figure. add_line
(xdata, ydata[, zorder, color, ls, ax])Adds a line to the given axes, using Line2D
add_text
(text_label[, x, y, ax])Add text to given axis. add_text_left
(text_label[, x, y, ax])Add text to the left, Wraps add_text. add_x_bands
(x, sigma[, color, ax, alpha1, …])Adds vertical shaded bands showing one and two sigma ranges. add_x_marker
(marker[, color, ls, lw, ax])Adds a vertical line marking some x value. add_y_bands
(y, sigma[, color, ax, alpha1, …])Adds horizontal shaded bands showing one and two sigma ranges. add_y_marker
(marker[, color, ls, lw, ax])Adds a horizontal line marking some y value. export
([fname, adir, watermark, tag])Exports given figure to a file. finish_plot
([legend_labels, legend_loc, …])Finish the current plot, adjusting subplot spacing and adding legend get_param_array
(root[, params, renames])Gets an array of ParamInfo
for named paramsmake_figure
([nplot, nx, ny, xstretch, ystretch])Makes a new figure. newPlot
()Resets the given plotter to make a new empty plot. paramBoundsForRoot
(root)Get any hard prior bounds for the parameters with root file name paramNamesForRoot
(root)Get the parameter names and labels ParamNames
instance for the given root nameparam_latex_label
(root, name[, labelParams])Returns the latex label for given parameter. plot_1d
(roots, param[, marker, …])Make a single 1D plot with marginalized density lines. plot_2d
(roots[, param1, param2, param_pair, …])Create a single 2D line, contour or filled plot. plot_2d_scatter
(roots, param1, param2[, …])Make a 2D sample scatter plot. plot_3d
(roots[, params, params_for_plots, …])Make a 2D scatter plot colored by the value of a third parameter (a 3D plot). plots_1d
(roots[, params, legend_labels, …])Make an array of 1D marginalized density subplots plots_2d
(roots[, param1, params2, …])Make an array of 2D line, filled or contour plots. plots_2d_triplets
(root_params_triplets[, …])Creates an array of 2D plots, where each plot uses different samples, x and y parameters plots_3d
(roots, param_sets[, nx, legend_labels])Create multiple 3D subplots plots_3d_z
(roots, param_x, param_y[, …])Make set of sample scatter subplots of param_x against param_y, each coloured by values of parameters in param_z (all if None). rectangle_plot
(xparams, yparams[, yroots, …])Make a grid of 2D plots. rotate_yticklabels
([ax, rotation])Rotates the y-tick labels by given rotation (degrees) setAxes
([params, lims, do_xlabel, …])Set the axis labels and ticks, and various styles. set_xlabel
(param[, ax])Sets the label for the x axis. set_ylabel
(param[, ax])Sets the label for the y axis. show_all_settings
()Prints settings and library versions triangle_plot
(roots[, params, …])Make a trianglular array of 1D and 2D plots. - settings – a