Hi,
I would love to make multiple histograms transposed one on another
in order to show relation between the sets. I tried to write
a function like this, but R tells me, that I cannot use add=FALSE in
high-level commands. That's nice but I am supposed to do?
rm(list=ls())
# what's wrong with underscore?
#getwd("/home/matej/docs/skola/stat\_anal-cj3534/assign01/")
load("assign01.RData")
postscript("assign01.eps",onefile=FALSE)
plot(itg$WFemale,xlab="Number of victims",\
ylab="Frequencies",col="blue",main="Intimate Homicide\
Victims",type="l")
plot(itg$WMale,add=FALSE,axes=FALSE,col="red",type="l")
quit(save="no")
Please, be patient with me, I am really newbie, and although it is
probably pretty stupid question, I was not able to find an answer in
all documentation (moreover, R for Beginners says, that add is OK
for every graph).
Thanks for any hint,
Matej Cepl
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Wed, 9 Oct 2002, Matej Cepl wrote:
|Hi,
|
|I would love to make multiple histograms transposed one on another
|in order to show relation between the sets. I tried to write
|a function like this, but R tells me, that I cannot use add=FALSE in
|high-level commands. That's nice but I am supposed to do?
|
| rm(list=ls())
| # what's wrong with underscore?
|
#getwd("/home/matej/docs/skola/stat\_anal-cj3534/assign01/")
On my system (linux, R 1.5.1), underscore seems to work in file names both
quoted and unquoted.
| load("assign01.RData")
|
| postscript("assign01.eps",onefile=FALSE)
| plot(itg$WFemale,xlab="Number of victims",\
| ylab="Frequencies",col="blue",main="Intimate
Homicide\
| Victims",type="l")
| plot(itg$WMale,add=FALSE,axes=FALSE,col="red",type="l")
| quit(save="no")
I think you are trying to plot to line-plots on the same graph. If so, you
should use
plot(female...) # no add= here
lines(male....) # no add= here
lines is basically the same as plot(), but it does not erase the previous
picture.
If your idea was indeed to make to separate plots, drop add= in both cases.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._