Skip to content

Blurry images in inline R Notebook or Quarto document #16838

Closed

Description

@venpopov

I piloted Positron for the past year, and decided to switch back and now I have an issue with blurry images with custom scaling in visual mode notebooks (both Quarto and R Notebooks). Everything about the UI and the standard plot panel is cristal clear. Default plots inline are also clear. However, if I change the chunk fig-width and fig-height options, even slightly, the resulting inline plot becomes blurred and low resolution.

It does't matter if I make the figure larger or smaller than the default. I tried all graphics and anti-aliasing options in the global settings, didn't make a difference.

I'm not sure what change has introduced this issues, but it wasn't there last year. When I last used notebooks in rstudio with inline plots, I was on MacOS Sequioa - now I'm on Tahoe. Also running a newer version of Rstudio (latest). Same machine.

The problem is the same both on the laptop display, as well as on my 6k external monitor.

Here's an example (though github compression makes the difference less clear than in reality):

Image

System details

RStudio Edition : Desktop
RStudio Version : Version 2026.01.0+392 (2026.01.0+392)
OS Version      : MacOS 26
R Version       : 4.5.2

Steps to reproduce the problem

Describe the problem in detail

Describe the behavior you expected

  • [ x] I have read the guide for submitting good bug reports.
  • [ x] I have installed the latest version of RStudio, and confirmed that the issue still persists.
  • [ x] If I am reporting an RStudio crash, I have included a diagnostics report.
  • [ x] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

Activity

  1. added
    new
    on Jan 17, 2026
  2. added theissue type on Jan 26, 2026
  3. venpopov commented on Feb 2, 2026

    @venpopov
    Author

    Btw, this seems to happen with any change to the figure size options. Even something like changing the aspect ratio, which should keep the width unchanged, still leads to a blurrier image.

    Here's an example in the same notebook and session, without any options changed:

    Image

    and with setting the fig-asp = 1 option:

    Image

    The problem seems to be even worse on my work monitor, which these images were taken from.

  4. venpopov commented on Feb 2, 2026

    @venpopov
    Author

    Some additional information. I used the inspector see the source code (right click on the image in the notebook visual editor -> inspect element).

    The first image without any changes to the settings is 865 x 1400 pixels and is rendered down to 700 by 433
    The second image which had the "fig-asp: 1" setting is generated at 672 by 672 pixels and rendered at the same.

    Not sure why this difference is, but it helps explain that I'm not just seeing a difference, but also the saved resolution is more than half of the unmodified options version.

  5. venpopov commented on Feb 2, 2026

    @venpopov
    Author

    I tested this in a couple of different environments. All the above information is on my Mac with Tahoe and the latest Rstudio. Additionally:

    • RStudio Server 2026.01.0 Build 392, running on
      • Ubuntu cloud instance and accessed via browser on my Mac - same problem
      • Same instanced accessed via browser on a windows machine that I opened for the first time in 3 years - same problem
    • RStudio 2023.12.1 Build 402 running on the same old Windows machine (Win 11) - NO problem - images are perfectly crisp
    • RStudio Server 2026.01.0 Build 392 running on the same windows machine after updating - blurry images. No changes to R or any packages.

    It is definitely a platform-independent regression. The 2023 version of Rstudio that was installed on my windows machine displayed perfectly crisp images in Quarto Notebooks regardless of what options I set. The newer version seems to generate images which have chunk-options set with a much lower resolution. This only happens inside RStudio - when the notebook is rendered to html, the image quality is fine.

  6. ronblum commented on Feb 9, 2026

    @ronblum
    Contributor

    @venpopov I can't reproduce the issue in RStudio Desktop 2026.04.0-daily+257 on Windows 11. This is the Quarto document that I used. Can you try it out and let me know what happens?

    ---
    title: "Test for Blurry Images Bug #16838"
    format: html
    ---
    
    ## Testing Inline Plot Resolution
    
    This document tests the blurry image issue reported in RStudio issue #16838.
    
    ### Default Size Plot (Should be clear)
    
    ```{r}
    #| label: default-plot
    
    # Create a simple plot with default dimensions
    plot(1:10, 1:10, 
         main = "Default Size - Should be Clear",
         xlab = "X axis", 
         ylab = "Y axis",
         pch = 19,
         col = "blue",
         cex = 1.5)
    text(5, 5, "Clear Text?", cex = 1.5, col = "red")
    ```
    
    ### Custom Size Plot - Slightly Larger (May be blurry)
    
    ```{r}
    #| label: custom-larger
    #| fig-width: 8
    #| fig-height: 6
    
    # Same plot but with custom larger dimensions
    plot(1:10, 1:10, 
         main = "Larger Size (8x6) - Check for Blur",
         xlab = "X axis", 
         ylab = "Y axis",
         pch = 19,
         col = "blue",
         cex = 1.5)
    text(5, 5, "Blurry Text?", cex = 1.5, col = "red")
    ```
    
    ### Custom Size Plot - Slightly Smaller (May be blurry)
    
    ```{r}
    #| label: custom-smaller
    #| fig-width: 5
    #| fig-height: 4
    
    # Same plot but with custom smaller dimensions
    plot(1:10, 1:10, 
         main = "Smaller Size (5x4) - Check for Blur",
         xlab = "X axis", 
         ylab = "Y axis",
         pch = 19,
         col = "blue",
         cex = 1.5)
    text(5, 5, "Blurry Text?", cex = 1.5, col = "red")
    ```
    
    ### ggplot2 Test - Default Size
    
    ```{r}
    #| label: ggplot-default
    
    library(ggplot2)
    
    ggplot(mtcars, aes(x = wt, y = mpg)) +
      geom_point(size = 3, color = "blue") +
      geom_smooth(method = "lm", se = FALSE, color = "red") +
      labs(title = "ggplot2 Default Size - Should be Clear",
           x = "Weight (1000 lbs)",
           y = "Miles per Gallon") +
      theme_minimal(base_size = 14)
    ```
    
    ### ggplot2 Test - Custom Size (May be blurry)
    
    ```{r}
    #| label: ggplot-custom
    #| fig-width: 7
    #| fig-height: 5
    
    ggplot(mtcars, aes(x = wt, y = mpg)) +
      geom_point(size = 3, color = "blue") +
      geom_smooth(method = "lm", se = FALSE, color = "red") +
      labs(title = "ggplot2 Custom Size (7x5) - Check for Blur",
           x = "Weight (1000 lbs)",
           y = "Miles per Gallon") +
      theme_minimal(base_size = 14)
    ```
    
  7. added
    info needed
    on Feb 9, 2026
  8. venpopov commented on Feb 9, 2026

    @venpopov
    Author

    Thank you for looking into it and providing the test case. Here's what I did with it (on MacOS Tahoe, Rstudio 2026.01.0+392):

    • open RStudio
    • create new blank project in an empty folder
    • copy you exact code to a new quarto document
    • Run all chunks
    • right click on each of the two ggplot images inline and choose "Save image as", in order to send them to you

    The visual inspection inline is the same as I reported before - all the images you annotate as "Clear" are clear, and all the images that are annnotated as "blurry" are low resolution. Here are just the two ggplot examples, from the save procedure above as a zip file, so that they are not compressed or altered by embedding here. The blurry one is 672 x 480. The clear one is 865 x 1400

    Archive.zip

  9. venpopov commented on Feb 9, 2026

    @venpopov
    Author

    Here are the screenshots of RStudio as well, also as a zip file

    screenshots.zip

    I'm going to download the daily build and test there soon

  10. venpopov commented on Feb 12, 2026

    @venpopov
    Author

    Unfortunately still the same problem after installing the latest daily builld.

  11. removed
    new
    on Feb 18, 2026
  12. kevinushey commented on Feb 24, 2026

    @kevinushey
    Collaborator

    One other thing to check -- can you confirm which graphics backend you're using? In Tools -> Global Options... -> General -> Graphics:

    Image

    Are you using the default, AGG, or something else?

  13. venpopov commented on Feb 24, 2026

    @venpopov
    Author

    I am using default, but trying the others makes no difference. I also just set up a completely new Mac Studio in my office and only installed the basics I need - same problem. So as I noted above for windows and ubuntu, this is now 4 different machines across all operating systems that I have this issue with.

  14. kevinushey commented on Feb 24, 2026

    @kevinushey
    Collaborator

    Thanks -- I was able to reproduce on my macOS machine; I'll see what I can learn.

  15. self-assigned this
    on Feb 24, 2026
  16. added this to the Globemaster Allium milestone on Feb 24, 2026
  17. ronblum commented on Apr 7, 2026

    @ronblum
    Contributor

    Verified in Rstudio Desktop 2026.04.0-daily+476 now that I can trust my eyes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

info neededplots

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions