trans_format with ggplot2 0.9.2.1

121 views
Skip to first unread message

Mark

unread,
Sep 17, 2012, 6:32:10 PM9/17/12
to ggplot2
I didn't notice this with 0.9.2 but I have a problem with trans_format
and scale_colour_continuous. It seems to add single quotes to the
labels. scale_y_continuous handles it appropriately, however. Here is
an example:

> x <- runif(100, 0, 10)
> y <- 10^(x)
> qplot(x, y, colour=y) + scale_y_continuous(trans="log10", labels=trans_format("log10", math_format())) + scale_colour_continuous(trans="log10", labels=trans_format("log10", math_format()))
> trans_format("log10", math_format())(log_breaks()(y))

Dennis Murphy

unread,
Sep 17, 2012, 7:28:38 PM9/17/12
to Mark, ggplot2
Hi:

The same problem arises when you simplify the plot call - it appears that the problem is how math_format() communicates with scale_* functions. A parsing issue, perhaps?

library(ggplot2)
library(scales)


x <- runif(100, 0, 10)
qplot(x, x, color = x) + scale_y_continuous(labels = math_format()) +
        scale_color_continuous(labels = math_format())

Dennis


--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility

To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2

Winston Chang

unread,
Sep 18, 2012, 1:04:20 PM9/18/12
to Dennis Murphy, Mark, ggplot2
Hm, I'm not sure exactly what the issue is here, but it appears to be fixed in the development version.

-Winston
Reply all
Reply to author
Forward
0 new messages