Robin's Blog

Archive for the ‘Programming’ Category

Producing polar contour plots with matplotlib

In my field I often need to plot polar contour plots, and generally plotting tools don’t make this easy. In fact, I think I could rate every single graphing/plotting package in the world by the ease of producing a polar contour plot – and most would fail entirely! Still, I have managed to find a […]

John Snow’s famous cholera analysis data in modern GIS formats

In 1854 there was a massive cholera outbreak in Soho, London – in three days over 120 people died from the disease. Famously, John Snow plotted the locations of the deaths on a map and found they clustered around a pump in Broad Street – he suggested that the pump be taken out of service […]

Please use sensible colours in your maps

If you are creating maps then for goodness sake Use sensible colours!  I was helping some undergraduates with some work the other day, and they decided to use the following colour scheme for representing river depth: Deep water: Red Medium-depth water: Bright green Shallow water: Pink Why did they do this? Well, either they were […]

Get more detailed messages for maths errors in IDL

I’ve just discovered something that I feel I must share here – partly to make more people aware of it, and partly so I don’t forget it. In the IDL programming language you will sometimes find your program interrupted by a line saying something like: % Program caused arithmetic error: Floating divide by 0 Sometimes […]

The new iPython is awesome!

If you use Python you should use iPython. If you use iPython, particularly if you do work with matplotlib or with parallel programming, you should use the latest release. It. Is. Great. For those who don’t know, iPython is a replacement console for Python that offers many improvements over the standard console. For example, everything […]

Using PyDev with with the Enthought Python Distribution

I have recently discovered PyDev – a Python IDE which runs within Eclipse. Although I’d given up on big all-singing, all-dancing IDEs a few years ago I’m really liking it. The Ctrl-Space completion is very handy, as are the number of refactorings that are available from the menus. Anyway, I use the Enthought Python Distribution […]

My programming journey

When clearing out some of my old programming books the other day I realised how far I’d come with programming over the years, and the number of different technologies that I have used over time. I thought I’d do a little summary post going from first programming experience to now – and it’s amazing what’s […]