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
{{ message }}
Repository navigation
Plots with fixed fig.width are rendered differently in rstudio and knitr output #4913
to produce a plot with a fixed width and aspect ratio in rstudio
When knitting to html (or any other format I tried) the same plot is rendered differently, although the dimensions should be fixed here as well:
When comparing the image sizes the device size used in the html seems to have exactly half the width and height of the one used in the interactive notebook session in r studio.
If I add the following chunk to the beginning of my markdown document
and remove the fig.width argument from the actual chunk with the plot I get the exact same figure in rstudio and in the knitted html. I think this is the case because I set the figure dimensions in rstudio to half the standard values for rmarkdown without changing the values for the knitted document.
Describe the problem in detail
Just as a bit of background: My actual usecase is documenting data since analyses with bookdown. Rendering the chapters can take pretty long so I'd be a big time saver to get the plot dimensions right interactively in rstudio without having to render to see the results. For now I can get mostly around the problem with the mentioned setup chunk but in some cases I want a plot to have a higher fig.width and with the current behavior I can't really set this for each chunk separately.
Describe the behavior you expected
Plots with fixed dimensions in the interactive r studio notebook environment should have the same dimensions when knitted to an output format.
Moving to Cherry Blossom, in order to verify that it's fixed by PR #12324. If it's not, we'll reassign it to the current milestone. (Even though this is a duplicate, I'm including it in the list.)
Activity
ronblum commentedon Jun 7, 2019
@MaxKman Thank you for raising this. It looks like a duplicated of #4521, but I'll reference your detailed analysis there. And, you're welcome!
ronblum commentedon Dec 2, 2022
Moving to Cherry Blossom, in order to verify that it's fixed by PR #12324. If it's not, we'll reassign it to the current milestone. (Even though this is a duplicate, I'm including it in the list.)
jonvanausdeln commentedon Feb 6, 2023
I tested with 2023.03.0-daily+280 and this does not appear to be fixed. Moving back to triage to prioritize.