You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the plot is generated as an image in RStudio, the legend text fits perfectly but when exported to TikZ the legend size is too
small to fit. Here is the plot generated by R:
This is the TikZ image generated in a latex document:
Changing the width of the export does not fix the problem:
I get a different result when processing with tikz(..., standAlone = TRUE):
Note that the default Latin Modern font is used in my example. This is also the font whose metrics have been used to place the glyphs. You are using a different font in the final processing, but you are not telling tikzDevice about it. You need to add the required font packages to the preamble used by tikzDevice see section 2.1 in the tikzDevice vignette, in particular the options tikzLatexPackages, tikzXelatexPackages and tikzLualatexPackages.
When the plot is generated as an image in RStudio, the legend text fits perfectly but when exported to TikZ the legend size is too
![Rplot1](https://user-images.githubusercontent.com/79416297/174341746-63d18c9f-37d1-4730-a378-16b9794ef40b.png)
![Screenshot from 2022-06-17 18-46-49](https://user-images.githubusercontent.com/79416297/174341891-ee4ac341-4e4d-4ecc-a92b-073a95f482cb.png)
![Screenshot from 2022-06-17 18-46-00](https://user-images.githubusercontent.com/79416297/174341889-75b618ce-8d1a-4a26-a423-e01a3f45cc8e.png)
small to fit. Here is the plot generated by R:
This is the TikZ image generated in a latex document:
Changing the width of the export does not fix the problem:
Here is the R code:
Thanks.
The text was updated successfully, but these errors were encountered: