From: John H. <jdh...@ac...> - 2005-04-08 19:03:28
|
>>>>> "Rick" == Rick Muller <rm...@sa...> writes: Rick> I find the following definitions really useful: def Rick> xmin(val): a = axis() a[0]=val axis(a) return Rick> def xmax(val): a = axis() a[1]=val axis(a) return Rick> def ymin(val): a = axis() a[2]=val axis(a) return Rick> def ymax(val): a = axis() a[3]=val axis(a) return I'm not real keen on adding four new names to the pylab interface for such a small convenience. This has nothing to do with matlab compatibility, but just to try and limit the number of different functions that mostly do the same thing. Already we have axis, xlim, ylim, and ax.set_xlim, etc. Adding more different functions to set the limits is a recipe for complexity and confusion. I think there is a solution for you though by extending the functions already in place, which would entail just a little more typing. One possibility would be to allow kwargs to axis or xlim/ylim, so that you could do axis(xmin=2) and it would just update the xmin while keeping all other args the same. Alternatively, that interface could be expose in xlim/ylim xlim(xmin=2) What do you think? JDH |