ggplot2 axis color

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ggplot2 axis color

Felipe Carrillo
Hi:
Does anyone have an idea on how to color the axis and
labels using ggplot2? This is what I got:

library(ggplot2)
 p <- qplot(total_bill, tip, data = tips)
 NewPlot<-  p + geom_abline(slope=c(0.1,0.15,0.2),
colour=c("red","blue","yellow"),size=c(2,5,2))
NewPlot + geom_smooth(colour="green",
size=3,linetype=3)
NewPlot$background.fill<-"cornsilk"
NewPlot$background.colour <- "blue"
NewPlot$axis.colour<-"red"  ????? it doesn't do it
Thanks

 Felipe D. Carrillo
  Fishery Biologist
  US Fish & Wildlife Service
  Red Bluff, California 96080



      ____________________________________________________________________________________

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: ggplot2 axis color

hadley wickham
Hi Felipe,

Looks like a bug!  I'll try and get it fixed for the next version.  In
the meantime, you can read the last chapter of the ggplot book to see
how to fix it with grid.

Hadley

On 7/24/07, Felipe Carrillo <[hidden email]> wrote:

> Hi:
> Does anyone have an idea on how to color the axis and
> labels using ggplot2? This is what I got:
>
> library(ggplot2)
>  p <- qplot(total_bill, tip, data = tips)
>  NewPlot<-  p + geom_abline(slope=c(0.1,0.15,0.2),
> colour=c("red","blue","yellow"),size=c(2,5,2))
> NewPlot + geom_smooth(colour="green",
> size=3,linetype=3)
> NewPlot$background.fill<-"cornsilk"
> NewPlot$background.colour <- "blue"
> NewPlot$axis.colour<-"red"  ????? it doesn't do it
> Thanks
>
>  Felipe D. Carrillo
>   Fishery Biologist
>   US Fish & Wildlife Service
>   Red Bluff, California 96080
>
>
>
>       ____________________________________________________________________________________
>
> ______________________________________________
> [hidden email] 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.
>

______________________________________________
[hidden email] 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.