On Tue, Oct 19, 2010 at 1:27 PM, Friedrich Romstedt <
friedrichromst...@gmail.com> wrote:

>
> My idea would be to add another layer.  Meaning to provide a class
> which *creates* Axes, and which has other instances of *this class* in
> an attribute.  The attrib would be scalar.  Repetition is done via
> recursive call so some privat e method, initiated by a call to a
> public commit method.  So you would do in pseudo-code:
>
> level0 = LevelAxesGenerator()  # NOT actually creating the Axes, see below.
> level1 = LevelAxesGenerator(leaf=level0, repeat=10, direction='x')  #
> NOT creating too.
>
> level1.create(width=foo, height=bar)  # Subdividing automatically,
> generating Axes in the recursive calls on level0-level
>
> This shouldn't be super-hard.
>
> Sorry, I cannot help you with implementation currently.
>
> When you code it, think about general usability, also for other users,
> if you're inclined.  I would maybe have been such a user in the past.
>
> ``.create()`` could maybe called ``.commit()``, this is more specific.
>  Create can mean anything.
>
> You could even add a .populate() method, so that you can derive from
> ``LevelAxesGenerator`` and the instances automatically populate their
> axes based on the "coordinate" tuple (level0, level1, level2, ...).
> This would be really neat, and it's not too specific, because it'll be
> the main use of this level-functionality.



Hi Friedrich.  Thanks for your comments and suggestions.

What I need to clarify is the following.  First consider some simple plot A:
it has axes, data points, tick marks, labels, etc., and for all these
elements there are associated absolute x-y coordinates on the canvas.  If
now we make this plot A one of the subplots in a collection of, say, 12
subplots, arranged as 3 rows of 4 subplots each, all the x-y coordinates
associated with the original plot A will have to be translated and scaled,
so that the subplot lands in the right place on the canvas, and has the
appropriate size.  This process of translation and scaling is what I want to
pinpoint: What exactly is the connection between running the add_subplot
method and the translation+scaling that it entails?

The reason I need to do this is that for the hierarchical containment scheme
I described in my original post, this translation+scaling operation will
have to be done at every level.  It is not clear to me how the scheme you
describe would take care of all these repeated translation/scaling
transformations.

I could use some guidance to the source code.  What would be a good entry
point for me to answer the questions above by reading the source code?

(Maybe these questions would be more appropriate for the developers' list.)

~kj
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to