I wrote the following code to make the plot
pd<- position_dodge(.2) # # move them .05 to the left and right
pm25 <- ggplot(data, aes(x=CombSEG, y=conc,shape=A,color=A, lty=A, group=A)) +
geom_point() +
geom_line() +
geom_errorbar(aes(ymin=conc-se, ymax=conc+se),
width=.1, position=pd) +
theme_bw()+
limits(c(0
scale_y_log10(breaks=c(0.01,0.1,1),labels=c(0.01,0.1,1))
The automatic scale breaks are 10^-1.8, 10^-1.6, 10^-1.4 ... 10^-0.4. I would actually like the lowest tick to be 0.01 and the highest tickmark is 1.
Thank you for your help.
Edits: Here is what the plot look like after I tried your code.
Use coord_trans() instead of scale()
Use the
breaks
andlabels
arguments ofscale_y_log10
(read about them here).Looks like:
Then to modify the log10 scale to have custom breaks at .01, .1 and 1, use the
breaks
argument:Looks like:
Finally, if you want the labels to also be 0.1, .1 and 1, use the
labels
argument: