pylbo.visualisation.legend_handler ================================== .. py:module:: pylbo.visualisation.legend_handler Classes ------- .. autoapisummary:: pylbo.visualisation.legend_handler.LegendHandler Module Contents --------------- .. py:class:: LegendHandler(interactive) Main handler for legend stuff. .. attribute:: legend The matplotlib legend to use. :type: ~matplotlib.legend.Legend .. attribute:: alpha_point Alpha value for non-hidden lines or points. :type: int, float .. attribute:: alpha_region Alpha value for non-hidden regions. :type: int, float .. attribute:: alpha_hidden Alpha value for hidden artists. :type: int, float .. attribute:: marker The marker to use for points. :type: ~matplotlib.markers .. attribute:: markersize Size of the marker. :type: int, float .. attribute:: pickradius Radius around pickable items so pickevents are triggered. :type: int, float .. attribute:: linewidth Width of drawn lines. :type: int, float .. attribute:: legend_properties Additional properties used when setting the legend. :type: dict .. attribute:: interactive If `True`, makes the legend interactive :type: bool .. attribute:: autoscale If `True`, will check if autoscale is needed when clicking the legend. :type: bool .. !! processed by numpydoc !! .. py:attribute:: legend :value: None .. py:attribute:: alpha_point :value: 0.8 .. py:attribute:: alpha_region :value: 0.2 .. py:attribute:: alpha_hidden :value: 0.05 .. py:attribute:: marker :value: 'p' .. py:attribute:: markersize :value: 64 .. py:attribute:: pickradius :value: 10 .. py:attribute:: linewidth :value: 2 .. py:attribute:: legend_properties .. py:attribute:: interactive .. py:attribute:: autoscale :value: False .. py:attribute:: _drawn_items :value: [] .. py:attribute:: _legend_mapping .. py:attribute:: _make_visible_by_default :value: False .. py:method:: on_legend_pick(event) Determines what happens when the legend gets picked. :param event: The matplotlib pick event. :type event: ~matplotlib.backend_bases.PickEvent .. !! processed by numpydoc !! .. py:method:: make_legend_pickable() Makes the legend pickable, only used if interactive. .. !! processed by numpydoc !! .. py:method:: add(item) Adds an item to the list of drawn items on the canvas. :param item: A single object, usually a return from the matplotlib plot or scatter methods. :type item: object .. !! processed by numpydoc !! .. py:method:: _check_autoscaling() Checks if autoscaling is needed and if so, rescales the y-axis to the min-max value of the currently visible legend items. .. !! processed by numpydoc !!