Sie sind hier: Startseite / Services / Data Analysis and Visualization / Visualization / Software / Python matplotlib
Alle Inhalte des Nutzerportal sind nur auf Englisch verfügbar.

Python matplotlib

matplotlib is a python 2D plotting library which can be used in python scripts, the python and ipython shell.

matplotlib is a python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms. matplotlib can be used in python scripts, the python and ipython shell (ala MATLAB®* or Mathematica®), web application servers, and six graphical user interface toolkits.

matplotlib is free available: 

The matplotlib basemap toolkit is a library for plotting 2D data on maps in Python. It is similar in functionality to the matlab mapping toolbox, the IDL mapping facilities, GrADS, or the Generic Mapping Tools. PyNGL and CDAT are other libraries that provide similar capabilities in Python.

matplotlib basemap toolkit:


How to use the example scripts at DKRZ

On Mistral you have to load the python 2.7 module first:

module load python/2.7-ve0

The module python includes the matplotlib package already.

Copy the example script you want to use to your work space. Not all example data sets are available but most files are stored in


Modify and execute the script:

python <script name>

For example



DKRZ has created a GitHub Python repository named PyEarthScience that contains Visualization, Analysis and IO example scripts. The sence of the repository is to establish a kind of a platform for Earth scientists for searching and representing Python scripts and packages using PyNGL/PYNIO, matplotlib, cartopy, etc.  The repository is still in progress.



XY-plot  source code  Matplotlib xy-plot example w200
contour line plot  source code  Matplotlib contour lines example w200
contour filled plot  source code  Matplotlib contour filled example w400
map projections  source code  Matplotlib maps 1 example w400
Matplotlib maps 2 example w400
vector plot  source code  Matplotlib vector example w400
 vector on contour plot  source code  Matplotlib vector on contour example w400

ICON triangles

    run time: 28.1s
    PyNGL script only needs 4.1s

source code
Matplotlib unstructured ICON triangles example w400