Python's ploting problem is not imperative vs declarative. The main ugliness is basically "* * kwargs" every where. Every time it force you look at document to just find name of parameter you are looking for. Another common problem is Configs pass as string rather than enum.
are you arguing against keyword arguments in general, or against def foo(a, b, **kwargs): """ Refer to `bar` for the full list of allowed kwargs. """ ... i don't mind the former, but the latter always feels annoying. iirc matplotlib severely suffers from this
Altair – A declarative statistical visualization library for Python
21–30 of 45 posts
Re: Altair – A declarative statistical visualization library for Python
#22Re: Altair – A declarative statistical visualization library for Python
#23Anyway, this seems cool.
Re: Altair – A declarative statistical visualization library for Python
#24I've always hated matplotlib, even though it gets the job done. The graphs are ugly by default, and the API would be unusable if it weren't for StackOverflow. Maybe I just need to sit down and learn it really well. Anyway, this seems cool.
And it gets worse because it gets new APIs with almost identical names to the previous ones, without a proper guide for when to chose which API.
And yes it's just so ugly by default.
Re: Altair – A declarative statistical visualization library for Python
#25Earlier quoted context omitted.
Altair does have interactive legends actually. But dash is great for more complicated interactions and layouts. Panel, streamlit, and voila are also all potentially useful. https://altair-viz.github.io/gallery/interactive_legend.html https://altair-viz.github.io/user_guide/interactions.html#se...
I stand corrected, I may have to revisit Altair. Some of those other options look pretty compelling too I think it's definitely time for something to replace Matplotlib as the go-to for python plotting.
Re: Altair – A declarative statistical visualization library for Python
#26If you are missing ggplot2 in Python, I’d say look here first.
Re: Altair – A declarative statistical visualization library for Python
#27Earlier quoted context omitted.
I've seen this done by making a fake legend out of a bar chart. As far as I know, there's no way to make an interactive legend in Altair. Personally I would look into plotly / dash for something with interactivity.
Altair does have interactive legends actually. But dash is great for more complicated interactions and layouts. Panel, streamlit, and voila are also all potentially useful. https://altair-viz.github.io/gallery/interactive_legend.html https://altair-viz.github.io/user_guide/interactions.html#se...
Re: Altair – A declarative statistical visualization library for Python
#28Altair isn’t quite that, but it’s the closest I’ve seen. I wish python had ggplot2 with its html widgets, but this will do.
I’ve been really impressed with the browser compatibility in that I’ve yet to find a bug despite lots of weird mobile users. That and the team adds functionality quickly so almost as soon as I’m annoyed at not ability to add captions, it’s made available.
Re: Altair – A declarative statistical visualization library for Python
#29I've always hated matplotlib, even though it gets the job done. The graphs are ugly by default, and the API would be unusable if it weren't for StackOverflow. Maybe I just need to sit down and learn it really well. Anyway, this seems cool.
How is this an addendum, rather than the main point? I will always take a flexible library that allows me to "get the job done" over a declarative framework that will do something similar to—but not exactly—what I need.
Re: Altair – A declarative statistical visualization library for Python
#30FYI - Altair is available on Google Colab notebooks without any hacks or modification. https://stackoverflow.com/a/56081568/112050