Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
An open access book on scientific visualization using Python and Matplotlib (github.com/rougier)
309 points by sebg on Nov 15, 2021 | hide | past | favorite | 35 comments


This person is prolific and has a ton of great tutorials, free books, and more in their repo (I like the numpy book: https://www.labri.fr/perso/nrougier/from-python-to-numpy/). Major thanks to the author for sharing all this knowledge.


Thanks!


Thank you for this:

https://rougier.github.io/python-visualization-landscape/lan...

and your other interesting projects.


Fantastic work!


Anyone have experience with both MatPlotLib and Vega / Vega-lite? I like working in Clojure and am just about to do a bunch of data-viz.

I've only done a simple line chart so far, and I used this oz library for interfacing with Clojure and displaying results in the browser. [1]

One of the problems was lack of error messages. Not sure what part of the tooling was failing me there.

[1]. https://github.com/metasoarous/oz


I can't speak to oz's error messages, but for the vega-lite + python integration, I've found altair pretty usable. In particular, simple scatter plots with tooltips were easy to get up and running.

https://altair-viz.github.io/

https://altair-viz.github.io/gallery/scatter_tooltips.html?h...


if you need simple output you can just run clojure in orgmode and output svg

https://geokon-gh.github.io/literate-clojure.html


Thanks for sharing. I may do this if I ever decide to do some 'notebook' style work. Oz mentions integrating with jupyter and whatever else, but I love org-mode and wouldn't really want to start using a tool other than Emacs if I could avoid it :)


To be clear, there isn't really any org magic going on. You can also do the same identical stuff directly from a REPL and just spit the SVGs to file.

I've also used the same stuff in a GUI - where the SVGs are rendered directly in the UI (I just parse the SVG elements and draw to the Canvas)

Oz/Vega/etc. innately have this blackbox JS layout/rendering layer which I'm weary of. Here you are just manipulating SVG hiccup directly in Clojure. And then at the very last stage it's exported to SVG's XML syntax.


I'm looking for a Library that can make timed message sequence diagrams. I.e message flows with timeouts and windows, for presenting radio protocols. Anyone know of one?


Some scripting and PlantUML might work.


Does anyone know of a site where people submit visualizations, where one might find these tools pushed to the extremes of what they can do in novel ways?


My friend, if you have not heard of it already, I am proud to introduce you to the magic that is Observable: https://observablehq.com/collection/@observablehq/visualizat...

I'm a full stack web dev, not a data scientist, but Observable has dramatically changed my relationship to code. The last time I felt this excited by programming was about 20 years ago when I was in middle school and discovered Game Maker's scripting language...


Perhaps the Information is Beautiful site?: https://informationisbeautiful.net

There is also the Data is Beautiful reddit: https://www.reddit.com/r/dataisbeautiful/



Apologies if it’s not what you had in mind, but the examples in the MPL docs are exceptionally thorough when it comes to showing off advanced features (though they can be quite hard to parse).

https://matplotlib.org/stable/gallery/index.html



This is the most visually aesthetic book I've ever seen, and seems to be amazingly thorough in material. Thanks for this!


Does anyone know if M. Rougier has posted his emacs config for python? I'm heavy on the emacs/python/science and I'm curious if he uses any of the more extensive packages, like elpy.


I'm using default python mode actually (no elpy, no lsp) and emacs python configuration is maybe 3 or 4 lines.


Make sense, cheers from an American scientist ! I purchased the hard copy despite it being from Amazon, although I understand the logistics at play there.

J'étais à Polytechnique à Paris pendant deux ans, j'aimerais que les Américains soient aussi au logiciel "Open Source" que les Français


I tried to avoid Amazon and even found a French printers but the mailing costs were too high outside Europe.


One of the reasons why we do it is that we don’t have the same funding lying around. And also a different attitude towards intellectual property and a strong dislike of being effectively hostage of a for-profit software company. At least that’s the feeling around here (not X, but close enough to meet people there for lunch :) ).

It is still more difficult than we’d like to get funded for Open Source development (as a non-CS scientist), but there have been some encouraging noise recently, and some political will to reduce our reliance on black-box commercial software.


This is beautiful!


Both the book and the organisation of the sources for the book are very impressive. Thanks for the marvellous work!


looks very nice and thorough! can't wait to have some free time in my hands to dive into it, thanks for the work.


This book is distributed under a non commercial license (CC-BY-NC-SA 4.0) [0].

While I understand that language is evolving and that only under a "strict definition" of open access does it mean removing barriers to copying and reuse [1], it's seems pretty duplicitous to say it's "open" while putting it under a non-commercial license.

[0] https://github.com/rougier/scientific-visualization-book/blo...

[1] https://en.wikipedia.org/w/index.php?title=Open_access&oldid...


it's seems pretty duplicitous to say it's "open" while putting it under a non-commercial license.

I can't really agree with that. For open source, yes, the OSD does make it clear that the definition does not permit licenses that prevent commercial resale. But "open access" for scientific works, or just technical documentation in general, does not seem - in vernacular use - to entail such a strict requirement.

Of course as an advocate of "free culture" in the most general sense, I might say I would prefer a book, paper, article, etc. to be published under something less restrictive. But I see nothing "duplicitious"[1] about this particular usage.

Consider that the corresponding Wikipedia entry on Open Access[2] contains this blurb, which supports the idea that both "gratis open access" and "libre open access" would be considered sub-types of the more general idea of "open access."

Similar to the free content definition, the terms 'gratis' and 'libre' were used in the BOAI definition to distinguish between free to read versus free to reuse.[38] Gratis open access (Free to read) refers to online access free of charge, and libre open access (open access) refers to online access free of charge plus some additional re-use rights

[1]: https://www.vocabulary.com/dictionary/duplicitous

[2]: https://en.wikipedia.org/wiki/Open_access


To expand upon this a little, it's worth noting that the book and the code are licensed separately and differently.


Yes, code is BSD licensed.


The NC part was mostly to avoid having someone to sell the book on some platform without my knowledge.


I'm not addressing the issue of whether you receive compensation for your work or your desire to have control over who copies it.

I'm pointing out that you've stated it's "open access" without making it open access, at least for a strict interpretation of open access.


this is not the (common) interpretation of open access, which usually means, "no paywall".


Maybe you could explain why a non commercial license would not be open, for anyone not looking to turn a profit off of the author’s work?


I can freely read, share and modify the book. The only restrictions is that I can't sell it. It's pretty open in my eyes ,even if it doesn't comply strictly to the definition of this or this organisation.

on the same topic, I've seen people say that GPL isn't free for example.




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

Search: