Legend in gef_visualisation

In my code I want to visualise a gef with an original gef layout as interpreted by the computer and a user defined soil layout. I the legend of this gef view I want to only see the names as given by the user. How can I do this?

As an example, in the image below I just want to see ‘Veen, Niet Voorbelast, Slap’ and not ‘Veen’

Hi Rutger,

Thanks for your question.
I see that you made this visualization using a PlotlyView.
Plotly traces include a showlegend argument which can be set to False to prevent those traces from showing up in the legend. By carefully setting showlegend in each trace you could be able to show or not show different layers in the legend of your figure.

Does that solve your problem?

Hi Daniël,

The visualisation has actually been created with an SVGView through the gef_visualisation function in VIKTOR’s geo.pyi file. Do you know how it’s possible in this view?

Ah, that is my mistake, thanks for the correction.

In that case there is currently little you can do. A possible work-around could be to alter the str which results from the gef_visualisation but that string is difficult to navigate so this would be very labour intensive.

We are picking up your issue internally to see whether we can provide some more means of customization. I will keep you posted on that in this thread.