Tag: visualisation

Separate IPython profiles for interactive use

I used to have two simple shell aliases for IPython: alias ipy=ipython alias pylab='ipython --pylab' These were separated for a couple of reasons: The pylab mode of IPython was deprecated, for good reason. It “infects” the global namespace with all matplotlib and numpy functions. It breaks two entries in the famous “Zen of Python”: Explicit is better than implicit. Namespaces are one honking great idea – let’s do more of those!

Plotting unevenly gridded contour plots

Quite often at work I have to generate colour maps of certain things, which are generally not sampled evenly in coordinate space. I am also a huge fan of Python, so I thought to myself: can I combine these things? Well until now I didnt think you could. Matplotlibs contour plots require evenly spaced x and y points with z points to match. This is until I found a way