简体   繁体   English

"在 Rstudio 中使用 keras 时,如何使绘图出现在 Rmarkdown 文件而不是查看器窗格中?"

[英]How to make plots appear in Rmarkdown file instead of viewer pane when working with keras in Rstudio?

I am new in R<\/code> and trying keras<\/code> in Rstudio<\/code> .我是R<\/code>新手,在Rstudio<\/code>中尝试使用keras<\/code> 。 All the accuracy<\/code> , loss<\/code> interactive plots by running fit() are appearing in Viewer<\/code> pane instead of Rmarkdown<\/code> file.通过运行 fit() 得到的所有accuracy<\/code> 、 loss<\/code>交互图都显示在Viewer<\/code>窗格中,而不是Rmarkdown<\/code>文件中。

All other plots usually plot inside Rmarkdown<\/code> files but not with keras.所有其他绘图通常在Rmarkdown<\/code>文件中绘制,但不使用 keras。

I have also checked Global settings<\/code> in Rstudio Tools>Global Options>R Markdown>Show output preview in "Window"<\/code> .我还检查了 Rstudio Tools>Global Options>R Markdown>Show output preview in "Window"<\/code>的Global settings<\/code> 。

How do I make them plot in Rmarkdown<\/code> instead of Viewer<\/code> Pane.如何让它们在Rmarkdown<\/code>而不是Viewer<\/code>窗格中绘制。

How do I make this mandatory for all plots to create inside Rmarkdown<\/code> files only and now in viewer pane?如何强制所有绘图仅在Rmarkdown<\/code>文件中创建,现在在查看器窗格中创建?

"

have you tried to plot in only one cell ?您是否尝试仅在一个单元格中进行绘图?

for example you have a code block only<\/code> like this例如,您only<\/code>这样的代码块

plot(x = dataframe$x, y = dataframe$y,
   xlab = "X",
   ylab = "Y",
   xlim = c(0,1.5),
   ylim = c(0,1.5),
   main = "X and Y between 0 and 1",
   col = dataframe$color,
   pch = 16,
   cex = 1.5
)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM