(ggplot2) # 创建数据集 data <- data.frame( x = 1:10, y = rnorm(10) ) # 绘制散点图并添加水平线 ggplot(data, aes(x = x, y = y)) + geom_point() + geom_hline(yintercept = 0, linetype = "dashed", color = "red") + labs(title =
factor(gt))) + geom_boxplot(outlier.shape = NA) + ggtitle("G-CSF") + geom_jitter(width=0.2,col='gray45') + theme_classic() + scale_fill_manual(values = c("#00AFBB", "#E7B800", "#FC4E07")) p3 p4<-dat02 %>% filter(cytokine == "IL1B") %>% mutate(new_value=qqnorm...
Functions:geom_line(),geom_step(),geom_path(),geom_errorbar() Error bars Add error bars to a bar and line plots Bar plot with error bars Line plot with error bars Dot plot with mean point and error bars Functions:geom_errorbarh(),geom_errorbar(),geom_linerange(),geom_pointrange()...
p14 <- ggbarplot(df3, x = "dose", y = "len", add = "mean_se", error.plot = "upper_errorbar") p14 1 2 3 4 # Change error.plot to "pointrange" p15 <- ggbarplot(df3, x = "dose", y = "len", add = "mean_s...
“_2000 to 2016_”) + theme( plot.subtitle = element_markdown() )ggtext is by Claus O. Wilke and is available on CRAN.Convey uncertainty: ggdistggdist adds geoms for visualizing data distribution and uncertainty, generating graphics like rain cloud plots and logit dotplots with new...
plot(x,y) #默认散点图 plot(x) #默认散点图 attach(mtcars) plot(x=wt,y=mpg, main='titile', xlab = 'x', ylab = 'b',pch=19) abline(lm(mpg~wt),col='red',lwd=2,lty=1) #添加最佳拟合的线性直线 #11.2 使用dotchart函数
xShowTitle=FALSE, yShowTitle=FALSE, xShowTickLabel=FALSE,yShowTickLabel=FALSE, hideAxisTicks=TRUE) # AxisLine : a vector of length 3 indicating the size, #the line type and the color of axis lines ggplot2.dotplot(data=df, xName='dose',yName='len', axisLine=c(1, "solid", "dark...
2.3 发散点图(Diverging Dot Plot) 2.4 面积图(Area Chart) 3. 排名(Ranking) 3.1 有序条形图 3.2 棒棒糖图(Lollipop Chart) 3.3 点图(Dot Plot) 3.4 坡度图(Slope Chart) ...
线(line,vline,abline,hline,stat_function等):一般是基于函数来处理位置 射(segment):特征是指定位置有xend和yend,表示射线方向 面(tile, rect):这类一般有xmax,xmin,ymax,ymin指定位置 棒(boxplot,bin,bar,histogram):往往是二维或一维变量,具有width属性 带(ribbon,smooth):透明是特征是透明的fill 补:包...
linetype="dashed", size=0.1) + # Draw dashed lines labs(title="Dot Plot", subtitle="Make Vs Avg. Mileage", caption="source: mpg") + coord_flip() 图片 倾斜图 斜率图是比较2个时间点之间位置的绝佳方法,既能展示值的大小变化,也能同时展示排名的变化。下图可以作为倾斜图的一个展示。