Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BUG: Issue with blitting of PyQt autoscaled figure #5135

Closed
@soupault

Description

@soupault

Hi!
I've faced following issue in my GUI-app with real-time data visualization.

I've created simple app with QWidget (with fixed size policy!) (for matplotlib plot) and QButton (to refresh the plot).

On creation, layout and figure occupy all available space within QWidget. Everything looks correct: I'm able to use different QAlignments, create several plots inside a single layout, etc.

But, during the blitting, it seems like that copy_from_bbox returns unscaled coordinates and background is being re-drawn incorrectly. At the same time, updated data points keep being updated on their correct positions (on x-axis), but also are being accumulated on old autoscaled background layer.

Here are some examples:

  1. Application started:
    1

  2. Clicked button once:
    2

You might see here, that grids have different steps.

  1. Clicked several times:
    3

Issue is also described at
http://stackoverflow.com/questions/32698501/fast-redrawing-with-pyqt-and-matplotlib .

As mentioned there, the issue happens both in Win7 and Linux, with both PyQt4 and PyQt5.

Using Python 3.4, latest stable matplotlib, numpy, etc.

Issue is, probably, related to #916 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions