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

Annotate_figure: use of superscript/subscript in the shared axis labels #165

Closed
mundreramesha opened this issue Mar 21, 2019 · 4 comments
Closed

Comments

@mundreramesha
Copy link

mundreramesha commented Mar 21, 2019

Hi! excellent package, I have small query- is it possible to use superscript/subscript of text/values/symbols/etc in shared axis label?

@thomaszwagerman
Copy link

Commenting as I am also looking for this solution.

@thomaszwagerman
Copy link

thomaszwagerman commented Oct 7, 2019

Hi,

I'm going to comment again, because I've found a quick solution. Here is an example containing both subscript and superscript if anyone else is struggling:

panel <- annotate_figure(panel, left = ggpubr::text_grob(bquote("Agricultural emission density ("*kg~NH[3]~ha^-1~yr^-1*")") ,rot =90))

As you can see, it does not really have anything to do with ggpubr functionality, and is more a case of using bquote() appropriately.

Hope this helps anyone else wondering how to use superscript/subscript in conjunction with annotate_figure.

@mundreramesha
Copy link
Author

mundreramesha commented Oct 7, 2019 via email

kassambara added a commit that referenced this issue Jun 13, 2020
@kassambara
Copy link
Owner

@thomaszwagerman thank you for your input, doc updated now

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

3 participants