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

Multiline legend entries with tikzDevice #2244

Open
3 tasks done
potash opened this issue Mar 20, 2023 · 1 comment
Open
3 tasks done

Multiline legend entries with tikzDevice #2244

potash opened this issue Mar 20, 2023 · 1 comment

Comments

@potash
Copy link

potash commented Mar 20, 2023


By filing an issue to this repo, I promise that

  • I have fully read the issue guide at https://yihui.org/issue/.
  • I have provided the necessary information about my issue.
    • If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
    • If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included xfun::session_info('knitr'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('yihui/knitr').
    • If I have posted the same issue elsewhere, I have also mentioned it in this issue.
  • I have learned the Github Markdown syntax, and formatted my issue correctly.

I understand that my issue may be closed if I don't fulfill my promises.

I don't totally understand the toolchain that allows me to render a ggplot2 figure using tikz in Rmarkdown so this might not be the right repository for this question. But I would like to use multiline text in a legend entry for a figure that is rendered with with this toolchain. Reading up on tikz, it seems that the way to do this is to add the align=left option to the text node and then use \\ to indicate a line break. So my question is: is there a good way to add align=left to the legend entry nodes in an automated way that will work with knitr?

@cderv
Copy link
Collaborator

cderv commented Mar 23, 2023

Can you share an example of a document with a ggplot2 and where you use the tikz device ?
This will help understand what is the issue here.

For a generic question, you can go to https://community.rstudio.com or other Q&A forum maybe too.

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

2 participants