From: Alan G I. <ai...@am...> - 2004-09-20 19:10:19
|
Hi John, Since I read your previous message so poorly, I really appreciate your willingness to communicate again. At the moment I'm overcaffeinated and underslept, so I may do as badly again. I just do not quite "get it" yet. I think I do not fully understand xlim and ylim. What I have been doing up to now to get what I need is to use figsize and 'axes' to determine the aspect ratio of the viewport (AR(V), the screen area where the data will be displayed) and then (after the plot) 'axis' to determine the aspect ratio of the viewing window (AR(W), the relative lengths of the axes in data units). OK, I see all these same steps, with the only thing new that instead of having to plug the right numbers into 'axis', I get a keyword instead. (That "only" is comparative, not disparaging, of course.) So here is what I think you are offering: a keyword that will set the same "width" of data to be displayed on each axis, so that the AR(W)=1. This means that I can determine the compression ration CR=AR(W)/AR(V) from AR(V) alone. And in particular, if I use figsize and 'axes' to give me AR(V)=1, then axis('equal') will produce a compression ratio of unity as well. Do I have that right? If so: i. this seems useful ii. this seems somewhat related to the behavior of axis('square') in Matlab, if I read the documentation right http://www.mathworks.com/access/helpdesk/help/techdoc/ref/axis.html iii. This does *not* seem to be like the behavior of Matlab's axis('equal') I'm not a Matlab user, but (relying on the documentation) here is an example of the kind of thing I think you get from axis('equal') in Matlab: #define function to graph def f(x): return 2*x**3-5*x #choose points in domain for plotting d=(arange(401)-200.0)/100 #set figure size for plot figure(1,figsize=(2,5)) #determine AR(V) = AR(W) = 5/2 axes([0.1, 0.1, 0.8, 0.8]) plot(d,f(d)) #determine AR(W) = 5/2 axis([-2,2,-5,5]) show() Conceptually this works a little backwards, of course. What you really know first is the AR(W) that you want, and you choose the AR(V) to yield a compression ratio of unity (so that the units match along each axis). So if I have understood correctly, you have indeed offered something that can be useful, but it should have a different name. Or this may be overcaffeinated babble. Gotta run... fwiw, Alan |