簡體   English   中英

一個x和y軸上的9個圖

[英]9 graph plot in one x and y axis

如何在R( ggplot2 )中繪制此圖?

所需結果的格式:

格式化以獲得所需的結果

x <- c(0.383358433,0.814784747,0.124074272,0.115872248)
y <- c(0.49729405,0.84456263,0.793699842,0.911446588)
z <- qplot(x,y,geom = "line")
z
x1 <- c(0.383358433,0.814784747,0.124074272,0.115872248)
y1 <- c(0.49729405,0.84456263,0.793699842,0.911446588)
z1 <- qplot(x1,y1,geom = "line")
z1
x2 <- c(0.383358433,0.814784747,0.124074272,0.115872248)
y2 <- c(0.49729405,0.84456263,0.793699842,0.911446588)
z2 <- qplot(x2,y2,geom = "line")
z2
x3 <- c(0.383358433,0.814784747,0.124074272,0.115872248)
y3 <- c(0.49729405,0.84456263,0.793699842,0.911446588)
z3 <- qplot(x3,y3,geom = "line")
z3
x4 <- c(0.383358433,0.814784747,0.124074272,0.115872248)
y4 <- c(0.49729405,0.84456263,0.793699842,0.911446588)
z4 <- qplot(x4,y4,geom = "line")
z4
x5 <- c(0.383358433,0.814784747,0.124074272,0.115872248)
y5 <- c(0.49729405,0.84456263,0.793699842,0.911446588)
z5 <- qplot(x,y,geom = "line")
z5
require(gridExtra)
grid.arrange(z,z1,z2,z3,z4,z5)

我嘗試使用ggplot但無法獲得所需的結果。

直接來自?grid.arrange的幫助頁面

plotList = list(z,z1,z2,z3,z4,z5)
arrangedPlot = marrangeGrob(plotList,nrow=3,ncol=3)
ggsave("multipage.png", arrangedPlot,device="png")

情節:

在此處輸入圖片說明

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM