【发布时间】:2015-07-12 11:06:25
【问题描述】:
我有一个 data.frame,我收集的数据是秒,我将它绘制在 y 轴上。但是,当我想绘制该数据时,我希望它在 y 轴上以毫秒为单位绘制。
如何修改 y 轴上出现的值,使其比实际出现的数据大 1000 倍,而绘制的点保持不变?
这是我目前使用的代码:
ggplot(DSRCdelay_cl, aes(x=numVehicles, y=value, colour=as.factor(clusteringDistance) ) ) +
geom_smooth(fill=NA, aes(group=clusteringDistance, size=0 ) ) +
xlab(expression( "Vehicles (per" ~km^2~")" ) ) +
ylab("DSRC delay") + scale_y_continuous() +
expand_limits(x =c(0), y =c(0,0.1) )
与此问题密切相关的其他答案是: transforming axis labels with a multiplier ggplot2 和:ggplot2 axis transformation by constant factor
【问题讨论】: