Skip to content

Note

Click here to download the full example code

Blinding Plots

You can blind parameters and not show axis labels very easily!

Just give ChainConsumer the blind parameter when plotting. You can specify True to blind all parameters, or give it a string (or list of strings) detailing the specific parameters you want blinded!

from chainconsumer import Chain, ChainConsumer, PlotConfig, make_sample

df = make_sample(num_dimensions=4, seed=1)
c = ChainConsumer()
c.add_chain(Chain(samples=df, name="Blind Me!"))
c.set_plot_config(PlotConfig(blind=["A", "B"]))
fig = c.plotter.plot()

$C = 10.0\pm 1.0$, $D = 14.98^{+1.03}_{-0.99}$

Notice the blinding applies to all plots

fig = c.plotter.plot_summary()

A, B, C, D

fig = c.plotter.plot_walks()

plot 1 blinding

fig = c.plotter.plot_distributions()

$C = 10.0\pm 1.0$, $D = 14.98^{+1.03}_{-0.99}$

And the LaTeX output

print(c.analysis.get_latex_table())

Out:

\begin{table}
    \centering
    \caption{}
    \label{tab:model_params}
    \begin{tabular}{ccc}
        \hline
                Model & C & D \\ 
                \hline
                Blind Me! & $10.0\pm 1.0$ & $14.98^{+1.03}_{-0.99}$ \\ 
                \hline
    \end{tabular}
\end{table}

Total running time of the script: ( 0 minutes 6.736 seconds)

Download Python source code: plot_1_blinding.py

Download Jupyter notebook: plot_1_blinding.ipynb

Gallery generated by mkdocs-gallery