It's been a while, please allow me to bump this...

> Sorry.  I use matplotlib to create PNGs graphics for display on a
> web-page.  I want to make the plots zoom-able.  I'll use javascript to
> capture the pixel positions of the user's selected zoom region on the
> PNG plot.  I'll then translate this into the coordinate system on the
> plot and redraw it with a new x, y range.  I'm having trouble
> translating the initial axises into the pixel positions (essentially
> where they are on the PNG image).
>
> For example, I use the following code to map point positions from the
> coordinate system to pixel positions.  I use an img map <MAP> to
> provide interaction with the actual lines.
>
> [CODE]
>
> lineObj = plt.plot(Xs,Ys,marker='o')[0]
> path, affine = lineObj._transformed_path.get_transformed_points_and_affine()
> path = affine.transform_path(path)
> for real,pixel in zip(lineObj.get_xydata(),path.vertices):
>  ## write <AREA> tag  for each point
>
> [/CODE]
>
> I'd like to get information similar to this for the axis of the plot.
>
> Thanks.
>

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to