Add support for log scale axes

This is a PR for #703 
This code has some duplication, it might be nice to factor this out into a function but we can return to that later.