Earlier quoted context omitted.
from matplotlib import pyplot as plt WTF? Broken from right there. What's a plt? "o" key broken? Why didn't they just call it pyplot? Why not just import pyplot pyplot.plot(lambda x: math.sin(x)) pyplot.plot(x=[0,1,2],y=[0,2,4])
The library is not forcing you to use plt as a shorthand. Nothing is stopping you from calling from matplotlib import pyplot pyplot.plot([0,1,2], [0,2,4])
Gnuplotlib: A gnuplot-based plotting backend for NumPy
61–69 of 69 posts
Re: Gnuplotlib: A gnuplot-based plotting backend for NumPy
#62I might have missed the memo where Gnuplot has a better api than matplot ;) Seriously though, there have been many attempts to make a "better matplotlib" and yet it's still going strong - mostly because when you really get into scientific plotting and need print quality plots or embed plots in an GUI with very specific parameters it's hard to beat. Sometimes you just need to place a label in a specific spot and that'…
Re: Gnuplotlib: A gnuplot-based plotting backend for NumPy
#63I've found Lets-Plots [0] to my least painful plotting option for Python so far. I'm so used to the grammar of graphics from ggplot, especially compared to plotting in matplotlib or seaborn. 0: https://lets-plot.org/
It looks like lets-plot does not implement the ggplot2 theme interface yet, unlike plotnine which is 99.99% compatible with ggplot2. On the other hand lets-plot also includes additional geospatial functionality on top of basic ggplot2 compatibility.
Re: Gnuplotlib: A gnuplot-based plotting backend for NumPy
#64Just a comment for the repo owners: insert images for each code example!
The docs link to the "guide" right at the top. This has basic usage examples and images: https://github.com/dkogan/gnuplotlib/blob/master/guide/guide...
Re: Gnuplotlib: A gnuplot-based plotting backend for NumPy
#65Earlier quoted context omitted.
The docs link to the "guide" right at the top. This has basic usage examples and images: https://github.com/dkogan/gnuplotlib/blob/master/guide/guide...
The landing page (readme, in the case of GitHub repos) is way too important. Even a one-click barrier to an examples page obscures the information unacceptably. UX principles also apply to documentation.
Re: Gnuplotlib: A gnuplot-based plotting backend for NumPy
#66I've found Lets-Plots [0] to my least painful plotting option for Python so far. I'm so used to the grammar of graphics from ggplot, especially compared to plotting in matplotlib or seaborn. 0: https://lets-plot.org/
Interesting. It seems the major difference with plotnine is that lets-plot is implemented in Kotlin and the Python package uses a Python-Kotlin bridge. Both lets-plot and plotnine are available under the MIT license. It looks like lets-plot does not implement the ggplot2 theme interface yet, unlike plotnine which is 99.99% compatible with ggplot2. On the other hand lets-plot also includes additional geospatial functi…
Re: Gnuplotlib: A gnuplot-based plotting backend for NumPy
#67Earlier quoted context omitted.
Interesting. It seems the major difference with plotnine is that lets-plot is implemented in Kotlin and the Python package uses a Python-Kotlin bridge. Both lets-plot and plotnine are available under the MIT license. It looks like lets-plot does not implement the ggplot2 theme interface yet, unlike plotnine which is 99.99% compatible with ggplot2. On the other hand lets-plot also includes additional geospatial functi…
Lets-plot does implement theme and more - flavors (i.e. color profiles) take a look: https://lets-plot.org/pages/charts.html#presentation-options...
Re: Gnuplotlib: A gnuplot-based plotting backend for NumPy
#68Earlier quoted context omitted.
Matplotlib is what is wrong with matplotlib.. Broadly, the problem is that its syntax was meant to reflect that of Matlab, which, I guess, makes it intuitive for Matlab users. For the rest of us, it's mostly unintuitive and inconsistent.
Can you give an example of its inconsistency? I would be genuinely interested what are the inconsistency from a Python-perspective. I am former Matlab/Octave user. To me the julia interface of matplotlib is actually quite nice to use, but unfortunately the installation is a bit brittle.
By the way, who came up with the idea that an axis object is a great handle to handle subplot settings..?
Re: Gnuplotlib: A gnuplot-based plotting backend for NumPy
#69Earlier quoted context omitted.
I see the potential long term but that api is unintuitive at best. It almost seems obstructively terse. (ggplot(mtcars, aes("wt", "mpg", color="factor(gear)")) + geom_point() + stat_smooth(method="lm") + facet_wrap("~gear")) From https://github.com/has2k1/plotnine , their front page examples. I get that it's ripping off the ggplot api, but why would they not alias "aes" to something more meaningful? It stands for "ae…
As who hadn't seriously used any plotting library, some of my questions: - Why isn't the first term `ggplot(mtcars, "wt", "mpg", color="factor(gear)")` instead? It seems that the second argument always has to be a `plotnine.mapping.aes(...)` call or a saved `aes` value. It is not really hard to distinguish `ggplot(data, saved_aes)` from `ggplot(data, "x-col", "y-col", ...)`. The only issue might be the third `environ…