[R] ggplot and colors

Ista Zahn istazahn at gmail.com
Mon Feb 4 14:11:57 CET 2013


Hi,

fill is not the same as color. You need

scale_color_manual(values=c("black",
"black" , "black", "black", "black", "black", "black", "black", "black",
"black", "black", "black" ))

although it is not clear why you are using aesthetic mapping to set
everything to black...

Best,
Ista

On Mon, Feb 4, 2013 at 6:17 AM, Adel ESSAFI <adelessafi at gmail.com> wrote:
> Hello,
> I have a problem with ggplot and colors
>
> I used this function to draw somes lines and I want them to be all black
> (just to test)
> however, I dont get any black line in the figure.
>
> Do you have any experience with ggplot and manual colors??
>
>
>
> ggplot(cmax, aes(cmax[,3], cmax[,6],colour=interaction(cmax[,1],cmax[,2])))
> + geom_line() +  geom_point() +  scale_fill_manual(values=c("black",
> "black" , "black", "black", "black", "black", "black", "black", "black",
> "black", "black", "black" ))
>
>
> best regards
>
>
>
>
>
> --
> PhD candidate in Computer Science
> Address
> 3 avenue lamine, cité ezzahra, Sousse 4000
> Tunisia
> tel: +216 97 246 706 (+33640302046 jusqu'au 15/6)
> fax: +216 71 391 166
>
> ______________________________________________
> 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.
>



More information about the R-help mailing list