top | item 12052083

An Introduction to Scientific Python – Matplotlib

49 points| Jmoir | 9 years ago |datadependence.com

17 comments

order

selectron|9 years ago

One of my biggest frustrations with python for data science is how bad the documentation for matplotlib is. Also the default settings leave a lot to be desired - look at the color map scatter plots to see what I mean. What is with all that white-space around the graph?

Jmoir|9 years ago

I fully agree with the crappy documentation. Which to be honest isn't consistent with the rest of the python sphere. Documentation tends to be pretty good generally. It's a shame.

lowmagnet|9 years ago

I find pandas documentation verbose but ultimately not real world. Every one of them generates random values which aren't visually distinct. Makes it hard to follow operations.

a_bonobo|9 years ago

tight_layout() gets rid of all that whitespace :)

There are some alternatives with pretty defaults - I personally love seaborn [1] which builds on top of matplotlib, but seaborn is even more "do it the way I like it or suffer the consequences" - however, the coming v2.0 of Matplotlib comes with a few API changes and a different default color scheme: http://matplotlib.org/style_changes.html or http://matplotlib.1069221.n5.nabble.com/matplotlib-v2-0-0b1-...

[1] http://stanford.edu/~mwaskom/software/seaborn/examples/index...

anc84|9 years ago

I needed pixel perfect plots for visualising raster data and did not manage to make it render that. Felt similar to LaTeX: Great if you like what it does by default but don't you dare want something reasonably different. :\

glup|9 years ago

Similar sentiments here. I get slightly further with ggplot2 but still end up fixing stuff manually in Illustrator which adds significant time. Anyone know 1) a more customizable plotting library or 2) a way to apply manual changes to new input pdfs? Biggest sticking points for me are overlapping labels and compositing multiple figures

wodenokoto|9 years ago

Is there a good introduction to using the object oriented interface to matplotlib?

I sometimes see it in examples and referenced in the documentation, but I can't really wrap my head around it.

rsrsrs86|9 years ago

Data to ink here is too low...