graphinglib.SmartFigureWCS.hide_default_legend_elements#
- property SmartFigureWCS.hide_default_legend_elements: bool | list[bool]#
Whether to hide default legend elements. This is useful if a custom legend was previously created using the
set_custom_legend()method and you want to hide the default labels created with eachPlottableelement’s label. Each SmartFigure controls its own default legend elements, so if this property is set to True in a nested SmartFigure, the default elements will be hidden even if the parent SmartFigure attempts to create a general legend. However, both the nested and parent SmartFigures need to set this property to False to display the default elements of a nested SmartFigure in a global general legend.Warning
The use of this property for simply toggling the visibility of the legend is discouraged. Instead, use the
show_legend()property to show or hide all the legend elements. This should only be used if a custom legend was created.