Live data from Hacker News

How to Generate FiveThirtyEight Graphs in Python

dataquest.io

51–56 of 56 posts

Re: How to Generate FiveThirtyEight Graphs in Python

#51
post #7
post #5

Pretty cool, but I actually prefer the standard style in matplotlib.

I agree – it's interesting how one is initially drawn to, yet eventually tires of these sorts of plot styles. While Seaborn strikes a good balance, clear and simple monochrome plots never go out of fashion. This is just as much the case when building fancy interactive plots using Shiny/Plotly etc.

Monochrome is problematic for plots with multiple series though, because people's eyes aren't good at distinguishing shades of gray. You can use dashed lines for stuff like line plots, but those don't work well for complex trends and you can only use one or two.

I think monochrome is great for some uses, but at least for the area I work in the majority of figures use color. I'd say the main reason to use monochrome is for print, but most scientific journals are online nowadays and even conference proceedings are handed out in color. Now that doesn't mean everybody uses color well but that's a different discussion...

Re: How to Generate FiveThirtyEight Graphs in Python

#52
post #3

Earlier quoted context omitted.

Matplotlib also allows xkcd style plots [1] if that is something you fancy :) [1] -- http://jakevdp.github.io/blog/2013/07/10/XKCD-plots-in-matpl...

The XKCD graphing is really easy to do, maybe FTE could be refined and incorporated too

I would abbreviate "FiveThirtyEight" as just 538. It's far clearer.

Re: How to Generate FiveThirtyEight Graphs in Python

#53
post #41
post #14

Earlier quoted context omitted.

Interesting, @bede @v3gas I would love to hear your thoughts on my plots -- http://abhirag.in/articles/price_data_present.html Too fancy? Too plain? Kinda ok? Kinda new to matplotlib, so your feedback would help :)

I think they're nice! I like the monospaced font for the axes. Fwiw, I would remove the legend in the case of there being only one curve, especially since you have good titles.

Thanks, I'll fix that, I was so engrossed in making sure that legends are in the right place that I totally overlooked the fact that they are redundant for single curve plots.

Re: How to Generate FiveThirtyEight Graphs in Python

#54
post #35
post #14

Earlier quoted context omitted.

Interesting, @bede @v3gas I would love to hear your thoughts on my plots -- http://abhirag.in/articles/price_data_present.html Too fancy? Too plain? Kinda ok? Kinda new to matplotlib, so your feedback would help :)

Nice charts. Just one idea, on your vegetable chart, you have onions as a red line and tomatoes as yellow. I would swap them around, as I automatically associate tomatoes with red.

Valid point :) I'll change the order of colors in my palette.

Re: How to Generate FiveThirtyEight Graphs in Python

#55

Earlier quoted context omitted.

The XKCD graphing is really easy to do, maybe FTE could be refined and incorporated too

I would abbreviate "FiveThirtyEight" as just 538. It's far clearer.

That was the abbreviation used in TFA.
Post reply on HN