Hi list,

I try to make plot with 2 line object and showing legend both of them. 
But I got an error about

Error in plot.xy(xy.coords(x, y), type = type, ...) :
  invalid plotting symbol

my code is below. It works if I comment graphic.legend line.

grdevices = importr('grDevices')
graphics = importr('graphics')
grdevices.png('testchart.png', width = 733, height = 550)
graphics.plot(wave,data,type="p",xlim=robjects.IntVector([500,2400]),xlab="Wavelength",ylab="Reflectance",pch=1,col="black")
graphics.lines(wave,data2,type="p",lty=1,lwd=1,pch=19,col="red")
graphics.legend('topleft',legend=['test','test2'],lty=2,pch=[1,19],col=["black","red"])
graphics.title("Plot graph")
grdevices.dev_off()


Please advise me for a solution.

Best regards

Sarawut

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to