# [R] Question re matplot

David Kaplan dkaplan at education.wisc.edu
Sun Oct 14 05:16:01 CEST 2007

```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

=======================================================================
David Kaplan, Ph.D.
Professor
Department of Educational Psychology
Educational Sciences, Room 1061
1025 W. Johnson Street

email: dkaplan at education.wisc.edu
Web:
http://www.education.wisc.edu/edpsych/facstaff/kaplan/kaplan.htm
Phone: 608-262-0836
Fax:   608-262-0843
=======================================================================

Marc Schwartz wrote:
> On Sat, 2007-10-13 at 22:00 -0500, David Kaplan wrote:
>> Hi,
>>
>> I have the following script for matplot
>>
>> 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",)
>>
>> The problem I'm having is with ylab.  It seems not to be
>> giving the entire label, but rather cuts of the first 3
>> variables giving me only (4)BB,(5)Runs,(6) BB.   How can I
>> get it to print the entire label?
>>
>>
>> David
>
> Is the above an exact copy of your script?
>
> If yes, what happens when you remember to put an '=' sign after
> 'ylab'?  :-)
>
> Also, you appear to have a superfluous ',' at the end of the function
> call, prior to the final close paren.
>
> HTH,
>
> Marc Schwartz
>
>

```