Re: [R] ggplot2: Changing colour scheme for bar plot filling?

2010-03-12 Thread Xie Chao
On Wed, Mar 10, 2010 at 6:13 PM, baptiste auguie
baptiste.aug...@googlemail.com wrote:
 not with the theme, as far as I know, but you can do:

 set_default_scale(fill, discrete,grey)

Can I set default shape in similar way? I tried this:

set_default_scale(shape, discrete, 19)
Error in get(paste(Scale, firstUpper(scale), sep = )) :
  object 'Scale19' not found

Thanks a lot!

Xie Chao


 baptiste

 On 10 March 2010 10:31, Johannes Graumann johannes_graum...@web.de wrote:
 Indeed. Thank you. Is there a global switch analogous to
 theme_set(theme_bw())?

 thanks for your help, Joh

 On Wednesday 10 March 2010 10:29:05 baptiste auguie wrote:
 Hi,

 last_plot() + scale_fill_grey()

 should do it

 HTH,

 baptiste

 On 10 March 2010 09:46, Johannes Graumann johannes_graum...@web.de wrote:
  Hello,
 
  I'd like to sitch to a monochrome/bw color-palette for the filling of
  geom_bar-bars (produced via qplot as in the example below). Hours of
  googling didn't yield anything useful, so I thought, I'd just ask ...
 
  Thanks, Joh
 
  library(ggplot2)
  qplot(factor(cyl), data=mtcars, geom=bar, fill=factor(cyl))
 
  __
  R-help@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.



 __
 R-help@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.


__
R-help@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.


[R] ggplot2: Changing colour scheme for bar plot filling?

2010-03-10 Thread Johannes Graumann
Hello,

I'd like to sitch to a monochrome/bw color-palette for the filling of 
geom_bar-bars (produced via qplot as in the example below). Hours of 
googling didn't yield anything useful, so I thought, I'd just ask ...

Thanks, Joh

library(ggplot2)
qplot(factor(cyl), data=mtcars, geom=bar, fill=factor(cyl))

__
R-help@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.


Re: [R] ggplot2: Changing colour scheme for bar plot filling?

2010-03-10 Thread baptiste auguie
Hi,

last_plot() + scale_fill_grey()

should do it

HTH,

baptiste

On 10 March 2010 09:46, Johannes Graumann johannes_graum...@web.de wrote:
 Hello,

 I'd like to sitch to a monochrome/bw color-palette for the filling of
 geom_bar-bars (produced via qplot as in the example below). Hours of
 googling didn't yield anything useful, so I thought, I'd just ask ...

 Thanks, Joh

 library(ggplot2)
 qplot(factor(cyl), data=mtcars, geom=bar, fill=factor(cyl))

 __
 R-help@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.


__
R-help@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.


Re: [R] ggplot2: Changing colour scheme for bar plot filling?

2010-03-10 Thread Johannes Graumann
Indeed. Thank you. Is there a global switch analogous to 
theme_set(theme_bw())?

thanks for your help, Joh

On Wednesday 10 March 2010 10:29:05 baptiste auguie wrote:
 Hi,
 
 last_plot() + scale_fill_grey()
 
 should do it
 
 HTH,
 
 baptiste
 
 On 10 March 2010 09:46, Johannes Graumann johannes_graum...@web.de wrote:
  Hello,
 
  I'd like to sitch to a monochrome/bw color-palette for the filling of
  geom_bar-bars (produced via qplot as in the example below). Hours of
  googling didn't yield anything useful, so I thought, I'd just ask ...
 
  Thanks, Joh
 
  library(ggplot2)
  qplot(factor(cyl), data=mtcars, geom=bar, fill=factor(cyl))
 
  __
  R-help@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.
 


signature.asc
Description: This is a digitally signed message part.
__
R-help@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.


Re: [R] ggplot2: Changing colour scheme for bar plot filling?

2010-03-10 Thread baptiste auguie
not with the theme, as far as I know, but you can do:

set_default_scale(fill, discrete,grey)

baptiste

On 10 March 2010 10:31, Johannes Graumann johannes_graum...@web.de wrote:
 Indeed. Thank you. Is there a global switch analogous to
 theme_set(theme_bw())?

 thanks for your help, Joh

 On Wednesday 10 March 2010 10:29:05 baptiste auguie wrote:
 Hi,

 last_plot() + scale_fill_grey()

 should do it

 HTH,

 baptiste

 On 10 March 2010 09:46, Johannes Graumann johannes_graum...@web.de wrote:
  Hello,
 
  I'd like to sitch to a monochrome/bw color-palette for the filling of
  geom_bar-bars (produced via qplot as in the example below). Hours of
  googling didn't yield anything useful, so I thought, I'd just ask ...
 
  Thanks, Joh
 
  library(ggplot2)
  qplot(factor(cyl), data=mtcars, geom=bar, fill=factor(cyl))
 
  __
  R-help@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.



__
R-help@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.


Re: [R] ggplot2: Changing colour scheme for bar plot filling?

2010-03-10 Thread Johannes Graumann
Works. Thank you!

Joh

On Wednesday 10 March 2010 11:13:09 you wrote:
 not with the theme, as far as I know, but you can do:
 
 set_default_scale(fill, discrete,grey)
 
 baptiste
 
 On 10 March 2010 10:31, Johannes Graumann johannes_graum...@web.de wrote:
  Indeed. Thank you. Is there a global switch analogous to
  theme_set(theme_bw())?
 
  thanks for your help, Joh
 
  On Wednesday 10 March 2010 10:29:05 baptiste auguie wrote:
  Hi,
 
  last_plot() + scale_fill_grey()
 
  should do it
 
  HTH,
 
  baptiste
 
  On 10 March 2010 09:46, Johannes Graumann johannes_graum...@web.de 
wrote:
   Hello,
  
   I'd like to sitch to a monochrome/bw color-palette for the filling of
   geom_bar-bars (produced via qplot as in the example below). Hours of
   googling didn't yield anything useful, so I thought, I'd just ask ...
  
   Thanks, Joh
  
   library(ggplot2)
   qplot(factor(cyl), data=mtcars, geom=bar, fill=factor(cyl))
  
   __
   R-help@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.
 


signature.asc
Description: This is a digitally signed message part.
__
R-help@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.