Open stefanradev93 opened 2 years ago
I assume you mean lavaanPlot
; can you show me an example? What output format are you using with Rmarkdown? If pdf, are you using the embed_plot_pdf
function?
Exactly, I mean lavaanPlot
. I am using HTML as an output format. You can see an example attached:
The plot takes up an entire page, compared to all other figures. I am basically doing
lavaanPlot(model = fit, coefs = T, stand = TRUE)
So one suggestion I can offer that might help is to use the save_png
function to save the plot as a png, and then in your .Rmd document you can embed that image. I think that when you save as png it doesn't save it with that big buffer. Let me know whether that helps.
@stefanradev93 I was able to solve this problem in rmarkdown
by installing pdfcrop
in the MiKTeX Console.
Edit: You also need to have ghostscript installed for this to work.
Hi Alex,
I have noticed that using the function
semPlot
in an Rmarkdown produces huge top and bottom white margins, larger than the actual graph. I have been struggling with this for a while. Any ideas on how to fix this?Thanks! Stefan