I have a data.frame where the data I have collected is seconds and I plot it on the y-axis. however when I want to plot that data, I want it do plotted with milliseconds as the unit on y-axis.
How can I modify the values which occur in the y-axis so they are 1000 times bigger than the data which actually occurs, while the plotted points remain the same?
This is the code which I use at the moment:
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) )
Other answers which closely answer this question are: transforming axis labels with a multiplier ggplot2 and: ggplot2 axis transformation by constant factor