Hi Allie,
Here are a few things you can try.
1) use a different colorbrewer pallet, e.g.,
scale_color_brewer(palette="YlGnBu") -- see
http://colorbrewer2.org/
for available palletes
2) use scale_color_discrete with appropriate h interval (see
?scale_color_discrete for details)
3) use scale_color_manual to choose the colors explicitly
Best,
Ista
On Mon, May 14, 2012 at 12:34 PM, Alexander Shenkin <
ashe...@ufl.edu> wrote:
>
> Hi Folks,
>
> I'm trying to put together a graph that groups on an ordered factor, and apply a gradient color scheme. scale_color_brewer() works, but it starts the scale with white, which is hard to see. I'd like to start with a more visible tone, and go darker from there. Any suggestions?
>
> Thanks,
> Allie
>
> > grp = floor(seq(100, 104.9, length.out=25))
> > mydf = data.frame(x=1:5, y=runif(25)+grp, grp=ordered(grp))
> > ggplot(data=mydf, aes(x=x, y=y, color=grp)) + geom_line() + scale_color_brewer()
>
>
>
> > ggplot(data=mydf, aes(x=x, y=y, color=grp)) + geom_line() + scale_color_gradient()
> Error: Discrete value supplied to continuous scale
>
> --
> 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