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
706 stars 38 forks source link

Can not Start Pylustrator #54

Open PhysXu opened 1 year ago

PhysXu commented 1 year ago

When I run import pylustrator, there always has an error of No module named 'matplotlib.backends.backend_qtagg' Could you give some suggestions to solve this issue?

image
rgerum commented 1 year ago

which matplotlib version are you using? I guess it's a matplotlib version issue.

PhysXu commented 1 year ago

which matplotlib version are you using? I guess it's a matplotlib version issue.

Thanks very much for the reply. The version of matplotlib is 3.4.3, please see below: image I have tried it in Jupyter_lab and Jupyter_notebook, the same error.

BTW, as I am new to Python, What can I do if I need to install a certain version of matplotlib?

rgerum commented 1 year ago

you can use

pip install matplotlib==3.6.2

in the command line.

But I will have a look at see that I can fix it to work also with the older matplotlib version again.

PhysXu commented 1 year ago

you can use

pip install matplotlib==3.6.2

in the command line.

But I will have a look at see that I can fix it to work also with the older matplotlib version again.

Thanks for the reply. I noted in the pylustrator website, it said that ** The package depends on:

numpy, matplotlib, pyqt5, qtpy, qtawesome, scikit-image, natsort**. Could you tell me which version of those packages I need to install to support PyLustrator? Thanks very much!

rgerum commented 1 year ago

natsort = ">=2.0.0" numpy = ">=1.0.3" matplotlib = ">=2.0.2" PyQt5 = ">=5.6" qtawesome = ">=0.5.0" scikit-image = ">=0.7.0"

this is what minimal versions should be supported. But apparently there is a problem with the support of older matplotlib versions. if you use matplotlib==3.6.2 it should work.

PhysXu commented 1 year ago

natsort = ">=2.0.0" numpy = ">=1.0.3" matplotlib = ">=2.0.2" PyQt5 = ">=5.6" qtawesome = ">=0.5.0" scikit-image = ">=0.7.0"

this is what minimal versions should be supported. But apparently there is a problem with the support of older matplotlib versions. if you use matplotlib==3.6.2 it should work.

Succeed after I updated my matplotlib! Thanks very much for your help!

PhysXu commented 1 year ago

natsort = ">=2.0.0" numpy = ">=1.0.3" matplotlib = ">=2.0.2" PyQt5 = ">=5.6" qtawesome = ">=0.5.0" scikit-image = ">=0.7.0"

this is what minimal versions should be supported. But apparently there is a problem with the support of older matplotlib versions. if you use matplotlib==3.6.2 it should work.

I have an additional question: As I used the JupyterLab, after I close the window of pylustrator, the cell was still running/stuck. Please see below: image

How to solve/avoid this?

rgerum commented 1 year ago

I tried around a bit and I think if you remove the %matplotlib qt pylustrator opens and the cell finishes after pylustrator has been closed.