Matplotlib 3.6
matplotlib.org
matplotlib.org
PyX is a much better alternative. Like TeX, everything you make looks great.
edit for links:
PyX is new to me, but it looks like it hasn't been updated in a while [2, 3].
[1] https://seaborn.pydata.org
Honestly there is no need to update it because it is already perfect. It is like TeX in that way.
However there is some missing stuff like contour plots.
[0]: https://matplotlib.org/stable/gallery/style_sheets/style_she...
[1]: https://matplotlib.org/stable/tutorials/introductory/customi...
[2]: https://pythonawesome.com/matplotlib-style-for-scientific-pu...
Documentation and other peoples' code seems to jump between the two. It's a really good example of the downsides of having too many ways to do the same thing in the same library.
Pyplot is a global namespace procedural interface similar to matlab. If you find an example online using pyplot, it’s easy to find the axis. counterpart. For example, plt.title() becomes axis.set_title().
Axes and Figure reference API docs are very good.
No doubt, but half the time when I am looking online for how to do something off the beaten path, I find a documentation page or stackoverflow answer that (only) uses the other interface, and I have to flail about for a while to come up with the OOP equivalent.
[0] https://matplotlib.org/stable/tutorials/introductory/quick_s...
https://github.com/rougier/matplotlib-tutorial
If you wan something deeper the same person has written a book:
Regarding the different APIs, this page [1] from the documentation attempts to compare them and provide code that generates the same result using the the different APIs.
[1] https://matplotlib.org/devdocs/users/explain/api_interfaces....
(The procedural / global state API is actually reasonable for interactive plotting from a REPL.)
(I would be curious to see whether it accounts for freshness at all - does it know the difference between examples in Python 2 and 3?)
But keep using plotly - keep visualizing data. It’s a superpower!
- It's slower than molasses in January for anything more than a few hundred data points. It regularly crashes VScode with the jupyter notebook plugin if I try to plot even 10 minutes of 100 hz data. That alone makes it a cheap toy. In gradschool, I was plotting hours of 25 kHz data in matlab with no problems.
- It's display mechanism is to show you plots is a web browser. I can't stand that. It's really slow to open a new browser tab for every plot. They don't re-use browser tabs, so after iterating for 10 minutes you have 20 open tabs.
- It's basically useless outside of a Jupyter notebook. If you try to use plotly outside of a jupyter notebook and want more than a single plot, good luck. At best you get different plots in different browser tabs, which is useless. Or you end up wasting time creating a web app just to view data.
- It's missing really basic functionality, like separate legends for different subplots.
- Maybe just personal preference, but I can't stand it's declarative interface. It leads to way more duplicated code and is too inflexible.
It is one of those projects that work, but feels weird. I think of it as I think of pandas or celery.