-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get_legend
only works with default legend position, will not detect if legend is "bottom" for instance
#205
Comments
suggestion to address `get_legend` issue wilkelab#205 - added `is_zeroGrob` function - 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.
This is a duplicate of #202. That issue also contains a suggested alternative implementation by Teun van den Brand that I think is the right way forward. If you want to prepare a PR based on that you're welcome to do so. |
@clauswilke my apologies, I should have checked to see if someone else had already commented on the error. From the discussion, it seems like the fix in #202 allows the user to pass along the expected location which is also reasonable. It still might be worthwhile to consider filtering out the zeroGrubs from Either way, thank you for this package, it's handy, just trying to see if I could help contribute and make it better! :) |
That's fine, you're welcome to merge your ideas and Teun's ideas in your PR. I haven't thought about this function much recently but I agree it should be fixed. |
The text was updated successfully, but these errors were encountered: