Hi folks
Using version 0.91.2, I do not manage to push ticks labels to the right
side of the axis, keeping ticks lines on both sides. How can I do it ?
Another question :
I have two subplot "in-line" (121 and 122) sharing the same yaxis.
How would you set a single set of yticks labels displayed between the
axes ?
···
--
Fabrice Silva <silva@...1918...>
LMA UPR CNRS 7051 - équipe S2M
Quoting Fabrice Silva:
Using version 0.91.2, I do not manage to push ticks labels to
the right side of the axis, keeping ticks lines on both
sides. How can I do it ?
One solution is
yax = gca().yaxis
yax.set_ticks_position('right')
# labels right side; removes left ticks
yax.set_ticks_position('both') # restores left ticks
draw() # update GUI
I have two subplot "in-line" (121 and 122) sharing the same yaxis.
How would you set a single set of yticks labels displayed
between the axes ?
Does
ax1 = subplot(1, 2, 1)
ax2 = subplot(1, 2, 2, sharey=ax1)
setp(ax1.get_yticklabels(), visible=False) # hide ax1 y labels
setp(ax2.yaxis.get_major_ticks(), pad=8) # adjust distance from y axis
draw() # update GUI
accomplish what you want?
I hope those help.
Stan