Skip to content

Conversation

@jkylearmstrong
Copy link

suggestion to address get_legend issue #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.

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.
updated test so now null is always expected
@clauswilke
Copy link
Contributor

See my comment in #205.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants