Live from AGU Fall Meeting 2010, I can’t resist to share some waves with you all !!
Month: December 2010
Matplotlib Fonts (plots, basemaps, etc.)
Here is the trick (well documented on the matplotlib webpage) to define the font family and size of what appears on your matplotlib plot:
Numpy Trick 01
I usually forget how much Numpy makes life easy : Say, you have a 101 element array, e.g.: import numpy as np a = np.linspace(0,100,101) and you want to take every 4th item in that array, that’s as easy as…
Numpy.ma not always necessary
I just discovered that there is an easier way to do this (e.g. from tutorial06): import numpy.ma as ma mask = ma.masked_where(countries[‘ISO’] != iso, countries[‘ISO’]) country = ma.array(countries[‘country’],mask=mask.mask).compressed()[0] by using the built-in numpy.where method: import numpy as np index =…
Don’t be scared …
Don’t be scared, you are on geophysique.be ! I’m just trying some new themes for this blog/website. I want to make it more readable, but also easier to search/scroll. I kinda like this “eos” theme, the “content” column is nice…