This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
other:python:matplotlib_by_jyp [2019/09/05 14:14] jypeter created (moved from https://wiki.lsce.ipsl.fr/pmip3/doku.php/other:python:jyp_steps) |
other:python:matplotlib_by_jyp [2020/01/28 10:34] jypeter [Working with matplotlib (JYP version)] Added links to map resources |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Working with matplotlib (JYP version) ====== | ====== Working with matplotlib (JYP version) ====== | ||
+ | **Summary**: there are lots of python libraries that you can use for plotting, but Matplotlib has become a //de facto// standard | ||
- | Summary: there are lots of python libraries that you can use for plotting, but Matplotlib has become a //de facto// standard | + | You can get more python information on the [[other:python:jyp_steps|JYP's recommended steps for learning python]] page. |
+ | |||
+ | You can get more information on plotting maps in the [[other:python:jyp_steps#cartopy_iris|Cartopy + Iris section]] and the [[other:python:jyp_steps#basemap|basemap section]] (no python3 support in basemap, basemap is being slowly replaced by cartopy), with examples on the [[other:python:maps_by_jyp|JYP's map room]] page. | ||
Where: [[http://matplotlib.org|Matplotlib web site]] | Where: [[http://matplotlib.org|Matplotlib web site]] | ||
Line 8: | Line 11: | ||
Help on //stack overflow//: [[https://stackoverflow.com/questions/tagged/matplotlib|matplotlib help]] | Help on //stack overflow//: [[https://stackoverflow.com/questions/tagged/matplotlib|matplotlib help]] | ||
- | The matplotlib documentation is good, but not always easy to use. <wrap hi>A good way to start with matplotlib</wrap> is to quickly read the following, practice, and read this section again | + | ===== Starting (and more) with matplotlib ===== |
+ | |||
+ | The matplotlib documentation is good, but not always easy to use : the package is powerful, there are lots of ways to do the same thing and it's easy to get lost. | ||
+ | |||
+ | There are lots of online tutorials that often don't show much more than a simple scatter plot with basic page setup. | ||
+ | |||
+ | This page will hopefully give you some keeys to become (progressively) a matplotlib power user. | ||
+ | |||
+ | <wrap hi>A good way to start with matplotlib</wrap> is to quickly read this section, practice, and read this section again (and again) | ||
- Have a quick look at the [[https://matplotlib.org/gallery/index.html|matplotlib gallery]] to get an idea of all you can do with matplotlib. Later, when you need to plot something, go back to the gallery to find some examples that are close to what you need and click on them to view their source code | - Have a quick look at the [[https://matplotlib.org/gallery/index.html|matplotlib gallery]] to get an idea of all you can do with matplotlib. Later, when you need to plot something, go back to the gallery to find some examples that are close to what you need and click on them to view their source code | ||
* some examples are more //pythonic// (ie object oriented) than others, and some examples mix different styles of coding, which can be quite confusing. Try to [[http://matplotlib.org/faq/usage_faq.html#coding-styles|use an object oriented way of doing things]]! | * some examples are more //pythonic// (ie object oriented) than others, and some examples mix different styles of coding, which can be quite confusing. Try to [[http://matplotlib.org/faq/usage_faq.html#coding-styles|use an object oriented way of doing things]]! |