From: Greg W. <gr...@th...> - 2004-04-07 23:02:36
|
I'm not sure if this is a bug or a feature, but limits set before plotting aren't kept >>> sp = subplot(111) >>> sp.set_xlim([-5,5]) >>> sp.plot(arange(-10,10),arange(-10,10)) displays from -10 to 9. Axes.plot calls xaxis.autoscale_view() which undoes any previously set limits. I haven't used matlab so I can't say what it does, but I'd expect it to honor them (I think most plotting packages do). I looked to alter Axis.plot to basically say if xaxis.autoscale: xaxis.autoscale_view() but currently there doesn't seem to be a way to discern whether the current xaxis.viewlim was manually set or is the result of autoscale. Should this be a feature (set_xlim "sticks")? Does Axis need an autoscale attribute to enable this? This is version 0.52 (which btw has matplotlib.version set to '0.51'). Thanks, Greg |