Page 1 of 1

Remove automatic legend for a triplot figure

Posted: September 13 2020
by Dournac Fabien
Hello,

I am looking for removing the implicit legend with function g.triangle_plot :

First, I did a circumvented way to manually set the location of legend :

Code: Select all


# Call triplot
g.triangle_plot([matrix1, matrix2],
                names,
                filled = True,
                contour_colors = ['darkblue','red'],
                line_args = [{'lw':2, 'color':'darkblue'},
                {'lw':2, 'color':'red'}],
               )

g.add_legend(['Opt. Flat. No Gamma. - optimistic case - cross - standard situation - Criterion taking into accound a = 200', 'Pess. Flat. No Gamma. - pessimistic case - cross - standard situation - Criterion taking into account a = 300' ], bbox_to_anchor = [1.0, 8.5])
Unfortunately, there is another legend that appears and that displayss over the wanted legend produced by g.add_legend routine.

Here an example :

Image

How to remove explicitely this legend names 'Samples0,Samples1" ? I didn't find any options to not show it.

Regards

Re: Remove automatic legend for a triplot figure

Posted: September 14 2020
by Antony Lewis
Use the legend_labels argument passing an empty list.