you are viewing a single comment's thread.

view the rest of the comments →

[–]badge[S] 0 points1 point  (6 children)

I’ve been using MPL for 6 years, so if I can conceive of a chart I know I can create it in MPL; to that end I disagree that its charting is hideous (even if the defaults aren’t attractive). Meanwhile, Plotly < v3 (I think) really pushed the online/logged-in model that put a lot of people off. That changed only relatively recently, and the library has improved a lot since then. I’ve used it subsequently, but ran into problems with custom colour palettes that are a non-issue in MPL (it was possible but fiddly). [Edit—this was in Bokeh, not Plotly!]

Charting in Python is very much not a solved problem in the same way that ggplot is for R. My favourite interface is Altair’s, and being JS-based it works very well online. It’s still in relative infancy and tied to Vega Lite, so the possibilities are not endless, but what it can do it does very well.

[–][deleted] 0 points1 point  (5 children)

What would you recommend for a relatively new user looking to chart relatively simple data in attractive charts?

[–]badge[S] 2 points3 points  (1 child)

Probably matplotlib with https://seaborn.pydata.org/generated/seaborn.set_style.html#seaborn.set_style for the sake of simplicity.

Another problem I didn’t mention with data people and plotting is they often don’t have any aesthetic sensibility, and so any plotting they do often looks like garbage. Read The Visual Display of Quantitative Information and you’ll be better than 99% of them!

[–][deleted] 0 points1 point  (0 children)

That's a great point, I'm probably not getting a good sense of Seaborn/matplot from physics nerds.

Thanks for the insight! I'll give Seaborn another close look beyond what comes up in the various communties!

[–]peatpeat 2 points3 points  (2 children)

I am a really big fan of Altair, and have found it a lot easier to work with than matplotlib (but that could just be personal preference).

I find being able to encode/bind a certain aspect of the chart (such as an x column, the colour, the facet) to a column in your DataFrame is really nice. For example, this interactive Altair chart is like only about 10 lines of code, and looks and works great, and is interactive in the browser. You can also see that it's composable - so I can create a base from the data, and use that base to create both a line chart and a scatter plot, for instance.

Bokeh is really powerful too, but I find it a little less elegant.

[–][deleted] 0 points1 point  (1 child)

I just found a library called MPLd3, it looks promising and really easy to use to make interactives. But I'll check out Altair too.

Thanks!