Page 1 of 1

GetDist: removing legend

Posted: March 23 2017
by Graeme Addison
When I make plots using g = getdist.plots.getSinglePlotter then g.plots2d I seem to automatically end up with a legend across the top of my plot if I have multiple roots. Is there a way to disable this? Including something along the lines of g.add_legend adds a second legend without removing the default one.

The examples on this page: http://cosmologist.info/cosmomc/readme_python.html don't seem to have this problem. I noticed they were made using planckStyle.getSinglePlotter. Unfortunately importing planckStyle throws up some latex-related error on the machine where my chains live, so I was wondering if there was another way.

Re: GetDist: removing legend

Posted: March 24 2017
by Antony Lewis
Those examples are using plot_2D to built up the plot, not the automatic plots_2D.

You can also use

Code: Select all

g.settings.line_labels =False

GetDist: removing legend

Posted: March 24 2017
by Graeme Addison
Ah OK, hadn't appreciated the plot_2D vs plots_2D. Thanks.