[R] two questions about PLOT

From: Jie TANG <totangjie_at_gmail.com>
Date: Mon, 31 May 2010 22:44:19 +0800

here ,I want to plot two lines in one figure.But I have two problems 1) how to move one of the y-axis to be the right ? I tried to the command"axis(2)",But I failed.
2) how to add the axis information correctly.Since I have use the cmommand "axis(1,at=1:6,labels=gradeinfo$gradenam)"

   but it seems that the correct information that I want is superposition with the old axis information.What can i do ? the script and figure is shown as below .thanks .:)

outflnm<-paste(Outdic,"meansd.jpg",sep="/") jpeg(file=outflnm, bg="transparent")
legend<-c("average error","stand quare error") lgcol<-c("black","red1")
yylab<-c("forecast error")
xxlab<-c("typhoon class")

plot(avegrp,type='l',lty=1,col='black',lwd=4,xlab=xxlab,ylab=yylab) par(new=T)
#axis(2, col = "gold", lty = 2, lwd = 0.5)
legend("topright", legend, lty=llty, lwd=llwd,col =lgcol) axis(1,at=1:6,labels=gradeinfo$gradenam) dev.off()

Email: totangjie_at_gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

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

Received on Mon 31 May 2010 - 14:46:07 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 01 Jun 2010 - 12:00:25 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive