Closed wdecoster closed 5 years ago
FWIW I figured out a way on how to do this, but there might be a better way. I transformed the input data using np.log10()
and then changed the x labels as:
xticks = [int(i.get_text()) for i in ax[-1].get_xticklabels()]
ax[-1].set_xticklabels([10**i for i in xticks])
As things are, that's probably the easiest thing, though not ideal.
Something you could try is along the lines of:
for a in axes[:-1]:
a.set_xscale('log')
that avoids the error and should scale the data. But then you still need to manually fix the ticks in the last axis, which is the one that actually shows the ticks and labels.
Thanks for this nice package. I'm looking for a way to use a log10 transformation on the x-axis, and still display the 'right' values as ticklabels.
Things work fine with np.log10 transforming my input data, but then the tick labels don't make sense.
I tried
which throws an error because apparently ax is a list, so I tried:
which throws a ValueError because
ValueError: Data has no positive values, and therefore can not be log-scaled.
Do you have suggestions?