放大 R 中的图

发布于 2025-01-10 02:33:35 字数 1250 浏览 0 评论 0原文

我有一个名为“file1”的文件,以下是它的绘图和编码。问题是我需要显示并关注这些图的差异,但我不确定如何(并且我需要将其更改为灰度......所以甚至无法注意到差异!)。任何建议将不胜感激。

输入图片此处描述

cl<-rainbow(20)
labels1 <- c("t=1","t=2","t=3","t=4","t=5", "t=6")
title<-"Time"

b1<-ggplot(file1, aes(x=f11,colour=time, alpha=time, size=time))+
  geom_line(aes(y = S1))+scale_color_manual(values =c("t1"="red","t2"="magenta","t3"="coral4","t4"=cl[8],"t5"="blue","t6"="darkolivegreen"),
                     labels=labels1 ,name="Time")+
  scale_alpha_manual(values=c(1, 1, 1, 1, 1, 1),labels=labels1)+
  scale_size_manual(values = c(.6, .61, .61, .61, .61, .61),labels=labels1)+
  guides(colour = guide_legend(title=title),
         alpha = guide_legend(title=title),
         size = guide_legend(title=title))+
  labs(title="Column 1")+ theme_bw()+theme(plot.title=element_text(size=12,hjust=0.5,face="bold"))+ 
  theme(aspect.ratio = 1)+ theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank())+
  xlab( "growth")+ylab( "nutrient")+
    scale_x_continuous(breaks = seq(0, 0.5, by=0.10), limits=c(0,0.5))+
  scale_y_continuous(trans='log10')

b1

I have a file named "file1" and the following is the plot and coding for it. The problem is that I need to show and focus on the difference of these plot but I am not sure how (and I need to change this into grayscale ... so the difference cannot be even noticed!). Any suggestion would be highly appreciated.

enter image description here

cl<-rainbow(20)
labels1 <- c("t=1","t=2","t=3","t=4","t=5", "t=6")
title<-"Time"

b1<-ggplot(file1, aes(x=f11,colour=time, alpha=time, size=time))+
  geom_line(aes(y = S1))+scale_color_manual(values =c("t1"="red","t2"="magenta","t3"="coral4","t4"=cl[8],"t5"="blue","t6"="darkolivegreen"),
                     labels=labels1 ,name="Time")+
  scale_alpha_manual(values=c(1, 1, 1, 1, 1, 1),labels=labels1)+
  scale_size_manual(values = c(.6, .61, .61, .61, .61, .61),labels=labels1)+
  guides(colour = guide_legend(title=title),
         alpha = guide_legend(title=title),
         size = guide_legend(title=title))+
  labs(title="Column 1")+ theme_bw()+theme(plot.title=element_text(size=12,hjust=0.5,face="bold"))+ 
  theme(aspect.ratio = 1)+ theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank())+
  xlab( "growth")+ylab( "nutrient")+
    scale_x_continuous(breaks = seq(0, 0.5, by=0.10), limits=c(0,0.5))+
  scale_y_continuous(trans='log10')

b1

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文