Andrea Gavana : > after some great help from the Numpy users list, I have managed to > create "parallel curves". > > > But I can't really do that with the set of data I have, as the X and Y > variables have different order of magnitude and I need a single > subplot on the figure to have rectangular axes (not square). (...) > So, my question would be: how do I scale the > X and Y vectors so that the parallels look parallel to the main curve > even if the axes are not square and the X and Y variables have > different data-ranges/magnitudes? Andrea, you have TWO problems.
The first is to scale your offset according to your axes range. This can be done using ax.get_data_ratio(). In your case you will get 5, and this factor should enhance your vertical offset wrt. the horizontal. (Or, use .get_xlim() and .get_ylim() and do the computations yourself). The second problem is that your FIGURE scales your plot visually, independently of your axes, so without special scaling it will have different aspects according to your manipulation. An arbitrary affine transform will keep straight lines parallel, but no chance with arbitrary curves. You may play with fig.get_figwidth(), etc., but here my digging stops. Good luck. Jerzy Karczmarczuk ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users