Jake and company are doing nice work here. By comparison to the R community, I feel that the Python community sometimes swashbuckles toward new libraries without always doing a good review of prior art. Not so in this case.
Vega / Vega-lite are doing something cool, namely bringing the grammar of graphics to the web. By extension, Altair may not be the only plotting library you need in Python, but it's rapidly becoming the one I'd look to first.
I would be interested in hearing peoples experience of Altair vs Bokeh. I've used Bokeh on a couple of very small vis products, but never really dived into it fully. Altair seems to have a similar goals, and a similar design philosophy. Is that an accurate impressions? Does either of the two stand obviously ahead of the other?
Altair enables you to do very quick data visualizations of your data - this is crucial when doing Exploratory Data Analysis. There is minimal code to write to get sophisticated plots. That to me is its strength.
Bokeh's strength (for me) is when I need to heavily customize a visual to an extreme. I know of some who use it for streaming data - etc which cannot be done in altair.
Additionally you would only want to use Altair on medium sized data. But Bokeh in combination with Holoviews and Datashader can render incredible amounts of data (see pyviz.org)
You're right that matplotlib has an unpleasant API - I've never had a good experience with matplotlib, but I've used Altair for a few data viz tasks and love it.
Matplotlib intentionally took on the API that Matlab had created, to make it easier for Matlab users to jump over to the Python ecosystem. But today, very few people are coming to Python from a Matlab background so the API just looks wonky.
Matplotlib basically has two APIs, the global state Matlab-like one PyPlot (which is often used in beginner tutorials), and a much nicer object-oriented API, where state is explicitly connected to the plot components.
To quote from their documentation [1]: "While it is easy to quickly generate plots with the matplotlib.pyplot module, we recommend using the object-oriented approach for more control and customization of your plots."
I use matplotlib.pyplot for basically only two purposes, calling subplots to get figure and axis objects, or calling rc_context to set up a "with" block with certain settings (e.g. font size).
That said, I'm certainly watching where alternative plotting libraries are going. I've used bqplot a bit, but only played around with others so far.
I like Altair, and have built a couple analyses and products with it. In general, it's a convenient way to do exploratory data analysis. But I have found it to be sort of inflexible for simple variations on common chart types -- especially if you want to augment a chart with information that is not in the dataframe instance used to instantiate the altair.Chart object. For instance, if you want to draw a line overlay on a chart, the best way to do it (to my knowledge) is append the start and end coordinates to your dataframe before calling mark_line().
I'm curious whether anyone else has had similar frustrations? I wonder what enhancements might make practical use of Altair for those use cases easier.
For drawing lines with specific coordinate values, you can just encode position (x, y, x2, y2) of lines or rules with constant values?
If you have specific use case that's really cumbersome in Altair/Vega-Lite, please feel free to file an issue. We're happy to help improve the tool. :)
I haven't seen anyone build these specific applications but I don't see anything in the way of building it.
Notebooks can be shared just like any other Jupyter Notebook (charts become images unless are running the notebook). If you want something more polished, you can build a dashboard. Under the hood, Altair uses Vega-Lite so you can export your charts and embed them in a web dashboard with https://github.com/vega/vega-embed. To send charts, you can export them as images.
https://github.com/has2k1/plotnine matches the ggplot2 API and philosophy very closely and returns good results. It's not as polished as ggplot2 but is excellent for day-to-day work. The author also accepts PR's and is quick to respond to issues.
Vega / Vega-lite are doing something cool, namely bringing the grammar of graphics to the web. By extension, Altair may not be the only plotting library you need in Python, but it's rapidly becoming the one I'd look to first.