3 ms·
I hope with every fibre of my being that this eventually replaces matplotlib and pyplot.
by gfaure 3y ago
I hope with every fibre of my being that this eventually replaces matplotlib and pyplot.
- Enginerrrd 3y agoI can clearly see they've tried, and perhaps succeeded, in solving some of the frustrations of those tools. However, what on earth kind of behind the scenes object oriented abstract bastardization have they done wherein you modify the instance of the ggplot class by ADDING stuff to it with a + sign!? Like, when you're trying to toggle one of the flags that would get passed to the class object, why not just do it the way every other class in almost every python library i've ever used does? I find that horrifying. And I think it is just begging to get some bizarre errors, and I think that
- data-ottawa 3y agoIt’s a port of the R ggplot2 api which works the same way. This wouldn’t be a surprise to most R and statistical computing users.
- mathisfun123 3y agodef __add__(self, other): self += other return self Simple
- heywhatupboys 3y agowhat is the alternative? python doesn't have a pipe operator do you want to do plot(density(colorify(labelaxis(logscale .... )))))))
- atombender 3y agoPython doesn't have a built-in pipe operator, but that doesn't mean you can't do it. The pipe [1] library is popular. is_even = where(lambda x: x % 2 == 0) sum(fib() | is_even | take_while(lambda x: x < 4000000) The Apache Beam SDK for Python is another example. It has its own pipe expressions (|, >>, |>, etc.). [1] https://github.com/JulienPalard/Pipe https://github.com/JulienPalard/Pipe
- heywhatupboys 3y agoI would haver have + than | if we introduce "custom" operators. Like maybe bitshifting strings into streams wasn't the right syntax, Bjarne
- ftobin 3y agodatar effectively recreates a pipe operator and the tidyverse approach. df >> mutate(z=f.x) https://pypi.org/project/datar/ https://pypi.org/project/datar/