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

How to embed canvas into Pyqt5 #67

Open huyidao625 opened 1 month ago

huyidao625 commented 1 month ago

Hi , How to embed a drawing canvas in Pyqt5, retaining drag, selection, resizing, and more.

rgerum commented 1 month ago

If you mean a matplotlib plot in PyQt5 you can have a reference at the matplotlib documentation: https://matplotlib.org/stable/gallery/user_interfaces/embedding_in_qt_sgskip.html

huyidao625 commented 1 month ago

Sorry, there's something wrong with my description. I mean how to embed Pylustrator's canvas into pyqt. because I like can drag and drop and change size.

huyidao625 commented 1 month ago

I think I solved that problem,I write a demo based on version 0.9.4 . https://github.com/huyidao625/pylustrator-embedqt5

rgerum commented 1 month ago

I would appreciate if you would not copy the pylutrator code into your repository. Either you make a fork or just have it as a dependency. To make it clear for users where the code is coming from. Also change the readme to not include my text. Either remove it or mark it directly as a quote.

Happy to see that you solved the problem.

huyidao625 commented 1 month ago

I'm a novice programmer, please accept my apologies. I deleted the old repositories and fork your repository . Thank you so much for making such good software and open source it。

huyidao625 commented 1 month ago

Thanks again, I'm sorry I didn't use the latest branch , it based on v0.9.4, this is my forked repository: https://github.com/huyidao625/pylustrator

image