I am trying to gain control of the Holoviews Curve (though this should work for any other plotting element) and set the y-tick labels to be in scientific notations.
In MatPlotLib I would do this with ticklabel_format(style='sci', axis='y', scilimits=(0,0))
.
Currently I have this:
But would like the Y axis numbers to be in scientific notations instead of the long decimal numbers currently shown on the Y axis.
Is there anyway to do this and what is it?
HoloViews let's you supply a tick formatter directly on a Dimension, so you can do something like this:
If you ever find options that you can't control directly you can always attach hooks on your Element, which will give you direct control over the plotting object, e.g.:
The
plot
argument to the callback function is the HoloViews plotting class, which will let you access various plotting objects on itshandles
attribute. The handles contain various important plot objects, for example the'axis'
keyword corresponds to the matplotlibAxes
object, but among other things you can also access and modify the Figure using'fig'
and theArtist
using'artist'
.