Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7771561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:40:55+00:00 2026-06-01T16:40:55+00:00

I have a PyQt4 application with embedded matplotlib figures in it. As you see

  • 0

I have a PyQt4 application with embedded matplotlib figures in it.enter image description here

As you see I have added the navigation toolbar as a widget. I would like to be able to update the plot on the right based on the data displayed on the plot on the left. It seems the easiest way would be to hijack the info contained in whatever does the “zooming”. Or at least know when a zoom has occurred so I can recalculate and redraw on the right. Anyone have a good approach to this (re-implementing from the pick_event level would be a last resort)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T16:40:56+00:00Added an answer on June 1, 2026 at 4:40 pm

    The best way I came up with is creating a custom navigation toolbar with NavigationToolbar as the parent. Then I just added a signal to the custom version and overrode the draw method. In this way I could call the original draw method and emit my signal with whatever info I needed from the NavigationToolbar data structure.

    class NavigationToolbarCustom(NavigationToolbar):
    zoom_changed = pyqtSignal(float, float, name='zoomChanged')
    def __init__(self, canvas, parent):
        NavigationToolbar.__init__(self, canvas, parent)
        #super(NavigationToolbarCustom, self).__init__(self, canvas, parent)
    def draw(self):
        super(NavigationToolbarCustom,self).draw()
        if self._xypress == None:
             home_view = self._views.home()
             Xmin,Xmax = home_view[0][0:2]
        else:
            lastx, lasty, a, ind, lim, trans = self._xypress[0]
            Xmin,Xmax=a.get_xlim()
        self.zoom_changed.emit(Xmin,Xmax)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an embedded matplotlib plot in a PyQt4 application. This is the plotting
I have a PyQt4.9 window where I would like to toggle the translucency on
I have a PyQt program used to visualize some python objects. I would like
I'm creating a Qt application using PyQt4 in Python. I have chosen the Dialog
How do I set an application's taskbar icon in PyQt4? I have tried setWindowIcon,
I have a Python application (with GUI, using PyQt4) that gets spawned by the
I have a PyQt4 application with a QGridLayout as Layout. This layout has n
I am building an application in pyQt4 and I want it to be able
I have developed a PyQt4 application for analysing delimited log files containing numeric data.
I have used PyQt4.QtWebkit to crawl the web page in my django application.In the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.