library(ggplot2)
d <- factor(floor(rnorm(50,mean=5)))
qplot
(x=c('foo','bar'),geom="histogram",stat="bin",fill=d,position='stack') +
scale_fill_brewer(type="seq", palette=1,
name="foo",
breaks=rev(c(1,2,3,4,5)),
labels=rev(c("1","2","3","4","5"))
)
This only happened recently - so does scale_fill_brewer depend on the
online service? What could I use as a workaround to end up with
identical scales?
-- Christian
This is related to the bug that others have reported with rearranged
categorical order on the x axis. It will be fixed in the next
version, which I'm trying to release asap.
Hadley
On Fri, Mar 20, 2009 at 3:29 AM, Christian Lindig <lin...@gmail.com> wrote:
>
> I have noticed that scales returned by scale_fill_brewer(type='seq') are not
> always sequential and in general vary a lot between invocations. The code
> below will result in different scales when executed multiple times.
>
> library(ggplot2)
> d <- factor(floor(rnorm(50,mean=5)))
> qplot(x=c('foo','bar'),geom="histogram",stat="bin",fill=d,position='stack')
> +
> scale_fill_brewer(type="seq", palette=1,
> name="foo",
> breaks=rev(c(1,2,3,4,5)),
> labels=rev(c("1","2","3","4","5"))
> )
>
> This only happened recently - so does scale_fill_brewer depend on the online
> service? What could I use as a workaround to end up with identical scales?
>
> -- Christian