plot2.r modified to use rdata