rgerum / pylustrator

Visualisations of data are at the core of every publication of scientific research results. They have to be as clear as possible to facilitate the communication of research. As data can have different formats and shapes, the visualisations often have to be adapted to reflect the data as well as possible. We developed Pylustrator, an interface to directly edit python generated matplotlib graphs to finalize them for publication. Therefore, subplots can be resized and dragged around by the mouse, text and annotations can be added. The changes can be saved to the initial plot file as python code.
GNU General Public License v3.0
707 stars 37 forks source link

MatplotlibWidget' object has no attribute '_dpi_ratio #33

Closed xihajun closed 2 years ago

xihajun commented 2 years ago

Hi, thanks for your cool package. But I got some issues when try to run your example code using python run_example.py after pip install pylustrator.

  File "xxx/venv/lib/python3.7/site-packages/pylustrator/QComplexWidgets.py", line 1345, in icon
    pm.setDevicePixelRatio(self.canvas._dpi_ratio)
AttributeError: 'MatplotlibWidget' object has no attribute '_dpi_ratio'

Do you have any idea of solving this?

Many thanks, Jun

rgerum commented 2 years ago

Hi, this is a problem I already solved some days ago with my last commit :-D But it is still in the current package version. I should do a bugfix release so that pylustrator can be used with the current matplotlib verison. https://github.com/rgerum/pylustrator/commit/23ecf6718051b9d20227e97b25e490f3ff741deb

rgerum commented 2 years ago

I have released a new version. If you update the issue should be gone

xihajun commented 2 years ago

Thank you so much!