【发布时间】:2015-05-12 01:50:23
【问题描述】:
我需要打印一个单倍型网络以高质量地 png。但是,要按照我想要的方式绘制,我需要使用交互功能更改一些内容。当我使用png() 打印绘图时,我无法进行这些更改,因为它打印到 pdf 而不是绘图窗口。有什么办法可以将其更改为打印到绘图窗口以及 png ?
一个可重现的情节示例:
install.packages("pegas")
library(pegas)
data(woodmouse)
net <- haploNet(haplotype(woodmouse))
plot(net)
o <- replot() # interactive
## click to rearrange the network at will...
## then do a different plot using the same coordinates:
plot(net, bg = "red", labels = FALSE, show.mutation = 2)
replot(o) # not interactive
我不想在 RStudio 中使用导出按钮,因为它生成的图表质量低下。
【问题讨论】:
标签: r plot interactive