CubeBrowser / cube-explorer

browser based exploration of iris cubes
BSD 3-Clause "New" or "Revised" License
8 stars 12 forks source link

Customizing axes using HoloViews plot options #13

Open philippjfr opened 8 years ago

philippjfr commented 8 years ago

Since plotting using cartopy uses a custom matplotlib Axes class to display geographic projection a lot of the code to set various axis options (e.g. ticking, labels, ranges) in HoloViews does not work correctly. We should either find a way to make the existing code in HoloViews compatible with the custom axes or reimplement it in the GeoPlotclass in this repository. The former would be preferable since the latter would also require overriding the behavior of the HoloViews OverlayPlot somehow.

jlstevens commented 8 years ago

Quite tricky!

I think it might be worth trying to figure out what should always be implemented on a matplotlib axis, whether it is a custom axis or not. Unfortunately, that won't help us right now seeing that the axes in cartopy don't seem to support what we want.

What I am suggesting is that maybe there is a third option: improve the cartopy axes if supporting what we need is general and an improvement to cartopy? If these axis options aren't applicable for domain specific reasons, that suggests we go for the second option suggested by @philippjfr. I just can't see how we could make HoloViews work with custom axes in general unless there is a suitable API we can always rely on...

philippjfr commented 8 years ago

I just can't see how we could make HoloViews work with custom axes in general unless there is a suitable API we can always rely on...

It may just be a case of using a different supported API in many cases but overall I agree with that assessment. Making specific changes to cartopy to make it more consistent with the matplotlib API where it makes sense is always a good idea.

I think I need to go through the various options and make a detailed list of what works and doesn't work, then we can go from there.