On Sat, 2007-10-13 at 22:16 -0500, David Kaplan wrote:
> Yea, sorry, that was a typo when I copied into my emal.
> 
> Here it is again
> matplot(battingagg$X, battingagg[, c("HR","RBI","X2B", "BB", 
> "R", "SB")], type="b",lty=4,lwd=2, col=1:4,xlab = "Year", 
> ylab = "(1)HRs, (2)RBIs, (3)DOUBLES,(4)BB,(5)Runs,(6) BB", 
> pty="m",sub = "Figure 2.  Plot of Selected Offensive 
> Baseball Statistics: 1901 - 2005")
> 
> David

<snip>

No problem. Just wanted to be sure that I wasn't missing something,
though I might have expected an error message of sorts.

As I don't have your data, I tried it with a single value:

battingagg <- data.frame(X = 1901:2005, HR = rep(20, 105))
                         

matplot(battingagg$X, battingagg$HR, type="b",lty=4,lwd=2, col=1:4,xlab = 
"Year", 
        ylab = "(1)HRs, (2)RBIs, (3)DOUBLES,(4)BB,(5)Runs,(6) BB", 
        pty="m",sub = "Figure 2.  Plot of Selected Offensive Baseball 
Statistics: 1901 - 2005")


This seems to work, so I am wondering if there is something in your
data.  Can you post the results of summary(battingagg) to see if there
is something going on with the ranges of the values in aggregate, as
matplot() will by default, set the y axis to the range of all of the
data.

Alternatively, if you can post a smaller sample of the data that
replicates the problem, that would be better.

Marc

______________________________________________
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.

Reply via email to