modified get_plot_component to filter all nonZero Grobs.
added return_all option to get_legend function.
A side effect is that now fails test "get legend" however, noted in comments the test is
"more of a duct tape solution than a reflection of the intended behaviour".
I think for almost all components it would be reasonable to return first nonZero Grubs by default, the option to return all also enables the user to grab all labels that match.
suggestion to address
get_legend
issue #205is_zeroGrob
functionget_plot_component
to filter all nonZero Grobs.get_legend
function.A side effect is that now fails test "get legend" however, noted in comments the test is
I think for almost all components it would be reasonable to return first nonZero Grubs by default, the option to return all also enables the user to grab all labels that match.