[pygtk] Interactive plots with pygtk

Stephen George steve_geo at optusnet.com.au
Thu Jan 27 05:52:20 WST 2011


Hi Soumyaroop,

Under pyGTK yes it does have panning and zooming.
You need to add a Navigation toolbar to get zoom/pan functions,  
something like a NavigationToolbar2GTKAgg.
Which navigation bar you add, depends on the back end you are running.

Then you will have the ability to pan, zoom, and all the other functions 
standard with the Tinker navigation bar.

Infact just went to look at the examples page ( 
http://matplotlib.sourceforge.net/examples/index.html ), and here is a 
sample that runs under pyGTK you can run.
http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_gtk2.html

If you don't know how to use the tool/navigation bar then that is a 
different question, but just try hovering over each button for a tool tip.

Once you get into matplotlib, you can hook into the event system and do 
so much more, but that all requires extra code to extend matplotlib 
functionality to your own needs.

- Steve

On 27/01/2011 5:36 AM, Soumyaroop Roy wrote:
> Let me rephrase what I said earlier. I want something like a
> plot/waveform viewer. Matplotlib does not appear to have zoom/cursor
> functionalities.
>
> -Soumyaroop
>
> On Tue, Jan 25, 2011 at 3:01 PM, Alessandro Dentella<sandro at e-den.it>  wrote:
>> On Tue, Jan 25, 2011 at 02:46:35PM -0800, Soumyaroop Roy wrote:
>>> Hi there:
>>>
>>> Are there any libraries built with pygtk to create interactive plots
>>> (histograms and line charts, mostly)? Say, I want to zoom in to a
>>> region or select a region in the plot to do something?
>>
>> have you tried matplotlib?
>>
>> sandro
>> *:-)
>>
>>



More information about the pygtk mailing list