-1

Does anyone have a converter that takes working plots created with matplotlib and produce a reasonable equivalent in pyqtgraph? Seems like it should be possible. It would save me a lot of time.

I'm new to pyqtgraph and find it's documentation less than helpful. I'm amazed to see how long pyqtgraph has been available and yet the version number leads you to believe it's not ready to be released. What am I missing? I also have tried using PyCharm's Ai Assistant and find it often struggles, creates non workable solutions, with pyqtgraph as if the documentation is not clear enough for it to work with AND it finds few helpful examples to study. Just guessing. I look for things I expect to find in pyqtgraph and find obtuse ways to create them like an arrow but not a simple way to create it. Still looking for plots easily available in matploblib but not readily found in pyqtgraph such as boxplots, horizontal bar charts, confidence bands, clusters. Examples like the short chapter in FitzGerald's book are less than helpful as they cover the most basic stuff, not even a histogram. I find recommendations like it's really fast not helpful - I'm concerned about speed of development/working with pyqtgraph infinitely more important than speed of code performance. Sounds more defensive than productive. I do want to use pyqtgraph as it fits well with the GUI I've built with Pyside6. Just struggling to get my footing. Any helpful leads, recommendations would be appreciated. I have yet to find any book on pyqtgraph. What's up with that?

1
  • They do things quite differently and their APIs are wildly different, so what you're asking would be a massive project and fail more often than succeed. Commented Jun 4, 2024 at 8:59

1 Answer 1

0

@misantroop I agree. These libraries do things very differently and a translator would potentially be a large project with many ways it could fail. I've now taken about ten different plots that I originally created in matplotlib and recreated them with pyqtgraph. There's clearly many statements that have equivalents in both. Both libraries have titles, labels, axes, ranges, lines, points, text, fills, modifiers, etc. A simple way to approach this is to do the mappings which can be established, leave the untranslated statements in as comments to be attended to and manage the expectation that the product is unfinished and likely to behave somewhat differently than the original. I would expect that they handle user inconsistency differently. What should they do if the user set the aspect ratio as equal and then supplied ranges that could not yield the desired aspect ratio. The answer would not be in a pure translation of the syntax. Some decisions would be left to the user. Like Ai bots, it would be more of a copilot rather than a pilot.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.