RStudio suddenly stopped showing plots in the plot pane

后端 未结 8 1282
一生所求
一生所求 2021-02-04 03:59

RStudio is not showing the generated plots in the plot pane anymore. Instead they open in a separate file with the name "Quartz". Here\'s my session info.:



        
相关标签:
8条回答
  • 2021-02-04 04:36

    I was able to visualize plots in the plot pane for a while before it vanished. All the attempts with the suggestions above failed. What is referred in the blog below got it working.

    https://datasciencelearner.wordpress.com/2014/08/17/my-plot-is-not-showing-up/

    The trick is to wrap the graphics command inside print function, for instance:

    print(
        plt2 <- ggplot(housing,
                   aes(x = Home.Value)) +
                      geom_histogram()
    )
    
    0 讨论(0)
  • 2021-02-04 04:37

    Follow below procedure to resolve the issue.

    dev.off()
    print(plot(1)) # Basically use print command once
    

    now use plot command as you normally use and should work fine.

    0 讨论(0)
  • 2021-02-04 04:44

    I am working with Rmarkdown, and in my case I solved this problem like this:

    1. Go to Tools->Global Options->Rmarkdown

    2. In "Show output preview in" select "Viewer Pane"

    3. Uncheck the box "Show output inline for all R Markdown documents"

    0 讨论(0)
  • 2021-02-04 04:46
    1. Go to "view" on the menu bar.
    2. Select "panes".
    3. Mark "all panes".
    0 讨论(0)
  • 2021-02-04 04:48

    It could be because graphic device are already on .

    To find indices of open devices:

    dev.cur()
    

    To close devices:

    dev.off(i)
    

    where i is index of device to be switched off.

    0 讨论(0)
  • 2021-02-04 04:51

    I had the same problem after updating R to version 3.3.2 and using RStudio 0.98.0. Installing the latest version of RStudio fixed the problem.

    0 讨论(0)
提交回复
热议问题