Hacker Newsnew | past | comments | ask | show | jobs | submit | mircealex's commentslogin

You're not adding a title, a subtitle, a signature bar. You're not bolding the line at y = 0, you're using block-style legends instead of adding customized labels. All these will require extra code.

Your example is potentially misleading in this discussion for anyone who won't bother to go through that article you linked to.

I'm not saying you can't do the graphs in under 10 lines of code, I'm just saying that your example totally misses the point.


The key word is "similar." (and yes I do add a titles/subtitle bar/caption)


Apologies, I only examined the first couple of graphs after the first "FiveThirtyEight" keyword, for which you don't have titles, subtitles etc.

The graphs on your article look really nice, but they are quite far from resembling FTE's, IMO.


Simply because we're interested to see if we can do in Python whatever we can do in other programming languages / software. We don't really want to learn a new programming language for every thing we can't do in Python yet.

Also, it took 17 lines of code to generate the graph in the tutorial, among which 6 lines were to add labels (excluding from the total the lines of code for reading in the data or importing modules). The teaching approach makes it look that long.

You could also write some functions if you coded this kind of graphs regularly, and make the whole process a breeze.


It really depends on why you're generating the graphs for. If you needed a visualization for a storytelling article, I really doubt you'd prefer matplotlib's bland standard style.

If you just want to visualize some data fast for yourself, then, yeah, the standard style is really great - it's readable and saves you time.


> I really doubt you'd prefer matplotlib's bland standard style (MBSS)

To be fair, MBSS got much better in the recent version 2.x

Before (version 1.x), I always had to use seaborn and/or modify parameters, but now the default style is good enough for most of my use cases.


Agree, the default style looks much better in 2.x. It's good enough for most use cases, but it's still quite far from publication level, IMO.


Yes, I agree! 1.x was pretty ugly


As someone who's moderately colorblind the color change is really helpful, so even for bland data visualizations it's actually better.


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: