|
From: oc-spam65 <oc-...@la...> - 2012-07-30 15:10:33
|
Hello,
Can the 'zorder' of the ticks be set? This minimal example shows a
hard-coded value of 2.5
This may come from file "matplotlib/axes.py", function "draw()". Can it
be adjusted? Shall it be bug-reported?
#######################################################################
import matplotlib.pyplot as pyplot
fig = pyplot.figure()
ax = fig.add_subplot("111")
ax.add_patch(pyplot.Rectangle((0,0), 1, 1, zorder=3))
ax.xaxis.set_zorder(4)
# Expected behavior: the ticks should be drawn after the Rectangle,
# because 4 > 3. They should therefore be visible.
pyplot.show()
# Problem: The ticks are hidden by the rectangle, contrary to the
# expected behavior.
print(ax.xaxis.get_zorder())
# Prints 2.5 instead of 4!
#######################################################################
|