Skip to content
Prev 199474 / 398506 Next

plot.window arguments being ignored?

Hi Dan,

I think it's because lines() is meant for you to add lines to a plot. Hence
it does not make R redraw the plot. If you wish to set the limits of the
y-axis (or x-axis for that matter), you should do it in the plot function
call, and then call lines() without the "ylim=ry" part. So your final two
lines could look like this:
  
  plot(time_for_graph[,1], preference_for_graph[,1], type="b", xlim=rx,
ylim= ry, xlab="Time", ylab="Preference") 
  lines(time_for_graph[,1], preference_for_graph[,2], type="b", col="red")

HTH,
Vik
---
Grad Student
Department of Statistics
University of Florida
ARRRRR_user wrote: