:py:mod:`pylbo.visualisation.legend_handler` ============================================ .. py:module:: pylbo.visualisation.legend_handler Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: pylbo.visualisation.legend_handler.LegendHandler Functions ~~~~~~~~~ .. autoapisummary:: pylbo.visualisation.legend_handler._get_legend_handles .. py:function:: _get_legend_handles(legend) Returns the legend handles. :param legend: The matplotlib legend to use. :type legend: ~matplotlib.legend.Legend :returns: **handles** -- A list of handles. :rtype: list .. !! processed by numpydoc !! .. 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: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 !!