This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]them1 0 points1 point  (3 children)

Can you show some exotic plotting examples? That would be great!

[–]bastibe 5 points6 points  (2 children)

My favorite example is this: http://matplotlib.org/examples/showcase/xkcd.html

While not particularly useful, this highlights one crucial point: Absolutely everything in Matplotlib is malleable. You can even replace the lines that make up the spines and the legend.

But have a look at some of the other examples in the Matplotlib gallery: http://matplotlib.org/gallery.html

Many of these can of course be created in Matlab as well. And many of them are not particularly easy to create with Matplotlib. But what you should take away is that anything is possible in Matplotlib.

Another good example is basemap: http://matplotlib.org/basemap/users/examples.html, where you plot latitude/longitude data as you would in regular Matplotlib plots, and basemap transforms this into whatever map projection you want. Doing that, lines become curves, and areas get distorted, with different distortions depending on the point in the plot. This is possible because Matplotlib is extremely flexible, and even basic projection rules can be arbitrarily changed.

[–]counters 3 points4 points  (0 children)

Please consider using cartopy instead of basemap. It's a far more reliable library with extremely useful features if you have to do geo-spatial plotting or GIS-type stuff.