Commit c373942e authored by Niklas Uwe Langner's avatar Niklas Uwe Langner
Browse files

[skymap] Round colorbar ticks

parent d70e521c
Pipeline #233470 passed with stages
in 6 minutes and 23 seconds
......@@ -46,7 +46,7 @@ def scatter(v, c=None, cblabel='log$_{10}$(Energy / eV)', opath=None, **kwargs):
vmin = kwargs.pop('vmin', smart_round(np.min(c[finite]), upper_border=False))
vmax = kwargs.pop('vmax', smart_round(np.max(c[finite]), upper_border=True))
step = smart_round((vmax - vmin) / 5., order=1)
cticks = kwargs.pop('cticks', np.arange(vmin, vmax, step))
cticks = kwargs.pop('cticks', np.round(np.arange(vmin, vmax, step), int(np.round(-np.log10(step), 0))))
clabels = kwargs.pop('clabels', cticks)
# read keyword arguments for the grid
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment