On Fri, Jul 16, 2010 at 10:21 AM, Ryan Wagner <ryan.wag...@roguewave.com> wrote:
> (Michael Droettboom)
>
>>> The display at the bottom that says "Cursor at: X, Y" is in pixels, not
>>> in
>
>>> data units. ?It would be great if this could display data units, though
>
>>> being general enough to support custom scales (eg. log) and projections
>>> (eg.
>
>>> polar) may be tricky without making a round-trip to the server.
>
>
>
> (Simon Ratcliffe)
>
>>As you mentioned, the trick is in giving the client some view on how
>
>>pixels should map to data values without fetching these for each mouse
>
>>movement. For simple cartesian plots this is probably pretty
>
>>straightforward. It is something we need to get working for our
>
>>internal use so it should get solved at some stage.
>
>
>
> I have accomplished this in one of my applications as follows:
>
>
>
> Axes =figure.get_axes()
>
> #The transform used in this axis is Composite Generic Transform, so get the
> two affine transformation matricies
>
> MatrixA  = axes[0].transData.inverted()._a.get_matrix()
>
> MatrixB  = axes[0].transData.inverted()._b.get_matrix()
[...]
> The simple affine transformation can be accomplished by leaving off the
> MatrixB part. Non affine will probably be similar to the above followed by a
> log or exponential operation.

The other option, which would be somewhat less accurate but would
avoid reimplementing every projection in javascript, would be to build
a mesh (e.g., a grid) over the client's viewport region, sample the
value of the projection at each point on the grid, send that to the
client, and then let the client do linear interpolation to estimate
points in between grid points.

-- Nathaniel

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to