[R] Ggplot2 equivalent of axis and problem with log scale

hadley wickham h.wickham at gmail.com
Wed Jul 25 16:55:38 CEST 2007


On 7/25/07, ONKELINX, Thierry <Thierry.ONKELINX at inbo.be> wrote:
> Dear useRs,
>
> Recently I've discorved ggplot2 and I must say that I really like it,
> although the documentation still is a working in progress.
>
> My first question: How can I change the position of the labels and the
> text of the labels? With a basic plot I would use axis(2, at =
> position.of.the.ticks, labels = text.at.the.ticks). Could someone
> provide me with an example of how to do this with ggplot2?

Have a look at scale_continous - in particular the breaks and labels
arguments (although I haven´t tested them much yet).  You need +
scale_x_continuous() and + scale_y_continuous() as appropriate.

> The second question is probably a little bug. If I plot the y-axis in
> log10 scale then geom_errorbar still plot the values in the original
> scale. See the example below. The second plot is what I would suspect
> when plotting the first graph.

Yes, that's a bug - I`ll try and get it fixed in the next version.

Thanks,

Hadley



More information about the R-help mailing list