[Matplotlib-users] Zooming in on Image data plotted using matplotlib

Juan Nunez-Iglesias jni.soma at gmail.com
Tue Apr 3 09:56:15 EDT 2018

I want to second Ben's email: I highly recommend his book. I fumbled
around for a long time with minor interactive matplotlib features. Then
I read his book and it completely clarified my mental model of mpl
interactivity and, indeed, of GUIs in general. Thanks Ben!
Here's an excerpt that describes my situation quite well:

Indeed, given that the primary audience for Matplotlib is scientific
programmersfor whom GUIs are, at best, an afterthought, Matplotlib provides a
gradual curveto create full-fledged GUI applications. For simple GUI tasks, one can
go quite far with Matplotlib without ever having to adopt a GUI
platform. And, as we will see in the next chapter, taking those final
steps into a GUI application would not require getting rid of any
existing code."""


On Tue, Apr 3, 2018, at 12:17 PM, Benjamin Root wrote:
> You can't get that feature out-of-the-box, but it is possible to
> construct such a feature with some work. You can create callbacks
> functions that take x/y coordinates to create a new figure window with
> remade imshow()'s. You might want to consider picking up a copy of my
> book, "Interactive Applications using Matplotlib", particularly
> focusing on chapter 2 on the callback system.> I hope that helps!
> Ben Root
> On Sun, Apr 1, 2018 at 6:08 PM, Sab VS <sabvs647 at gmail.com> wrote:
>> Hi,
>> I am trying to oom in on the image data plotted in 2 subplots using
>> matplotlib. However, the zooming in needs to take into consideration
>> both the images which are being displayed in the subplot. If I have 2
>> images on the subplot, I can click any one of these images. I then
>> get the x and y coordinates. But I am not sure how to open a new
>> window with the clicked coordinates and 5 or 10 pixels around the
>> clicked coordinates and display it in a new window.>> 
>> Could someone please help me out?
>> _______________________________________________
>>  Matplotlib-users mailing list
>> Matplotlib-users at python.org
>> https://mail.python.org/mailman/listinfo/matplotlib-users
> _________________________________________________
> Matplotlib-users mailing list
> Matplotlib-users at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20180403/a9c4b0dd/attachment.html>

More information about the Matplotlib-users mailing list