[R] pattern on bars?
Ko-Kang Wang
Ko-Kang at xtra.co.nz
Fri Aug 4 22:53:57 CEST 2000
----- Original Message -----
From: <s-luppescu at uchicago.edu>
To: "R Help List" <r-help at stat.math.ethz.ch>
Sent: Saturday, August 05, 2000 4:06 AM
Subject: [R] pattern on bars?
> Colors are real nice, but the publication I'm preparing these barplots for
> permits only black and white. The Splus plot options ``dbangle'' (or
plain
> ``angle'') and ``density'' (as on p. 65 of MASS 1st ed.) don't seem to be
> available in R. Is there another way to do this?
Certainly there are ways to do this.
One of the many ways is to use something like "col = gray...".
I've attached an example below:
csd <- matrix(c(4, 2, 4, 6,
4, 3, 1, 4,
4, 7, 7, 1,
0, 7, 3, 2,
4, 5, 3, 2,
5, 4, 2, 2,
3, 1, 3, 0,
4, 4, 6, 7,
1, 10, 8, 7,
1, 5, 3, 2,
1, 5, 2, 1,
4, 1, 4, 3,
0, 3, 0, 6,
2, 1, 5, 5),
nr = 4)
barplot(csd,
col = gray(5:9/10), # Use monochrome
ylim = c(0,30),
names = 72:85, xlab="Year", ylab="Students",
legend = c("Winter", "Spring", "Summer", "Fall"),
main = "Graduated PHD - CSD")
Cheers,
Ko-Kang
>
> I'm running R 1.1.0 on Linux (intel). Thanks.
> ______________________________________________________________________
> Stuart Luppescu -=-=- University of Chicago
> $(B:MJ8$HCRF`H~$NIc(B -=-=- s-luppescu at uchicago.edu
> http://www.consortium-chicago.org/people/sl/sl.html
> PGP Public Key: www.consortium-chicago.org/people/sl/pubkey.asc
> ICQ #21172047 AIM: psycho7070
> "What if" is a trademark of Hewlett Packard, so stop using it in your
> sentences without permission, or risk being sued.
> >> Sent on 04-Aug-2000 at 10:44:36 with xfmail
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-.-.-
> r-help mailing list -- Read
http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
>
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list