Skip to content
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

Extract Legend from Superheat #59

Open
foreignsand opened this issue Jun 23, 2021 · 0 comments
Open

Extract Legend from Superheat #59

foreignsand opened this issue Jun 23, 2021 · 0 comments

Comments

@foreignsand
Copy link

I'm using grid.arrange to plot a number of heat maps in a grid. I would like for them to then only have one legend and would like to be able to extract the legend from a superheat instance in order to plot it. Is there a way to do this?

I've tried a number of things, for example:

p = superheat(mtcars,
          # change the size of the labels
          left.label.size = 0.4,
          bottom.label.size = 0.1)

p$legend

or

p = superheat(mtcars,
          # change the size of the labels
          left.label.size = 0.4,
          bottom.label.size = 0.1)

p_legend = p$plot

p_legend$legend

But I've exhausted my options at this point.

Any help would be much appreciated!

Cheers,
Emily

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

No branches or pull requests

1 participant