# Matplotlib & Datetimes – Tutorial 03: Grouping Sparse Data

New tutorial, more advanced this time ! Let’s say we have a number of observations, like occurrences of earthquakes, or visitors connecting to a webserver, etc. These observations don’t occur every second, they are sparse on the time axis. To prepare an example, I’ve created a set of random datetimes like this : N =…

# New on Géophysique.be: Gallery

Everyone used to search for code snippets on the web know the importance of a “Gallery” linking to all examples and tutorials… So, here is my really ugly Gallery :

# Matplotlib Basemap tutorial 08: Shooting Great Circles

Following a question from Ricardo Gama (see his comment), I’ve prepared this new tutorial. He wondered if Basemap has a function similar to the track1 function in matlab (you know, that crappy costly thing…)… Here is what I obtained : The goal: Plotting great circles with Basemap, but knowing only the longitude, latitude, the azimuth…

# Matplotlib Basemap tutorial 05 : Adding some pie charts !

Hi folkes, Following a question by Gui on this website, I checked the “how to” draw pie charts on a basemap plot ! Here below I generalise the example given by Manuel Metz on the matplotlib website. The idea is to draw a pie from scratch, in a method that allows a custom number of…

# Matplotlib Basemap tutorial 03 : Masked arrays & Zoom

Here, we will focus on adding a “zoom box” on the top left corner of the plot. But before that, we will mask a part of the earthquakes, in order to have a “cleaner” map ! This is achieved by using the numpy.ma module : import numpy.ma as ma Mlon = ma.masked_outside(lon, 5.6, 7.5) #…