[R] Changing histogram stack in qplot
hadley wickham
h.wickham at gmail.com
Wed Jan 28 22:32:13 CET 2009
Hi Jason,
You'll need scale_fill_manual(values = c(low = "blue", middle =
"black", high = "red"))
See http://had.co.nz/ggplot2/scale_manual.html for more examples/details.
Regards,
Hadley
On Wed, Jan 28, 2009 at 3:11 PM, Jason Rupert <jasonkrupert at yahoo.com> wrote:
> I've been using qplot pretty successfully to generate stacked histograms. However, it appears that I need to tweak the colors a little.
>
> I've got three temperature variables (characters not numeric) and I need to change from the default qplot colors to the following:
> Low = Blue
> Middle = black
> High = Red
>
> Here is pseudo code of what I have currently:qplot(Run, data = TestData, breaks = hist_breaks, ,
> fill = TestData$Temperature,
> main = short_title) +
> scale_x_continuous("Run, Radians") + scale_y_continuous("Frequency") +
> scale_fill_discrete("Temperature")
>
> Thanks for any advice and insights.
>
>
>
>
>
> [[alternative HTML version deleted]]
>
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
--
http://had.co.nz/
More information about the R-help
mailing list