I would like to enforce that the ticks of my colorbar are equally spaced on the colorbar (not in their values) using SymLogNorm()
, like they are for example in the default mode of LogNorm()
. How could I do this without doing it by hand, i.e. without doing like the following:
plt.colorbar(ticks=[vmin, value1, ... , vmax])
What I want is basically to have the same ticks as I would have using LogNorm()
(Magnitudes). Here is how my code basically works:
import ...
...
y = np.loadtxt('my_data.dat')
vmin_a = y[0]
vmax_a = y[1]
norm_a = SymLogNorm(linthresh=0.5, linscale=0.03, vmin=vmin_a, vmax=vmax_a)
plt.figure(1)
plt.scatter(x[0], x[1], marker='.', s=7, linewidths=0, c=x[3], cmap= \
plt.get_cmap('RdBu_r'), norm=norm_rs)
plt.xlabel(xax)
plt.ylabel(yax)
plt.colorbar()
pl.xlim([vmin_a, vmax_a])
pl.ylim([vmin_a, vmax_a])
plt.show()
I think the following picture explains very well how I do not want it, i.e. how it actually looks like:
I am thankful for any hint.
Regards