[R] qplot, stacked area, own colourscheme

Albin Blaschka albin.blaschka at gmail.com
Wed Sep 24 16:14:07 CEST 2008


hadley wickham schrieb:
> On Wed, Sep 24, 2008 at 8:39 AM, Albin Blaschka
> <albin.blaschka at gmail.com> wrote:
[snip]
>>
>> As I have those categories (cover grasses, cover herbs...) I would like to
>> assign special colours to each (for example "cover grasses" => dark green,
>> "cover open soil" => brown ...), but I did not get it so far.
>> I tried several variations with area_geom, scale_manual but without
>> success...

> You want to modify the scale (the thing that converts data values to
> colours), not the geom:
> + scale_fill_manual(values = mycolorscheme)
> (And it's fill you want to change, not colour)
> This will also update the legend.
> 
> Hadley


Thank you very much, it works now - the right keywords were the problem: 
it seems I went wrong because for me "scale" had only a meaning in a 
spatial context (mother tongue is german), for example scale on a map or 
scale (range) of an axis...and I was fixed to changeing colours, but 
fill is now logical...

best wishes,
Albin


-- 
| Albin Blaschka, Mag.rer.nat.
| Etrichstrasse 26, A-5020 Salzburg
| * www.albinblaschka.info * www.thinkanimal.info *
| - It's hard to live in the mountains, hard but not hopeless!



More information about the R-help mailing list