[英]Change y axis text in ggplot
I have the following dataset I would like to plot.我有以下数据集,我想 plot。
library(tidyverse)
df <- data.frame(first=c(40,40,40),second=c(40,80,160),third=c(40,160,640), ID=c("ID1","ID2","ID3")) %>% pivot_longer(cols=-ID)
I am using:我在用:
ggplot(df2, aes(x=name, y=value, group=ID)) +
geom_line() +
geom_point(size=4)
Is there a way to change the values shown on the y axis:有没有办法改变 y 轴上显示的值:
1:40
1:80
1:160
1:320
1:640
Basically, I am writing a string for the continues numeric values on y基本上,我正在为 y 上的连续数值编写一个字符串
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.