Description
Problem
I would like to be able to modify the alpha of both the line and marker in a legend as an extension of this example: https://matplotlib.org/stable/gallery/event_handling/legend_picking.html
However, currently the only way to access the marker in in the legend in order to set it's alpha value is via the private legline._legmarker
attribute.
matplotlib/lib/matplotlib/legend_handler.py
Line 254 in 108e1b0
This is not ideal for the reasons that @jklymak noted in #9155 (comment)
This is pretty hacky, and the undrscore means it could go away.
So with the current public api the best you can achieve is:
Proposed Solution
The simplest solution would be to drop the underscore on the legmarker and add modifying the marker to the example as a way of documenting.