From: Benjamin R. <ben...@ou...> - 2012-06-13 19:22:45
|
On Wed, Jun 13, 2012 at 10:46 AM, Peter Würtz <pw...@go...>wrote: > > I'm sorry, there seems to be a mess. Nabble told me that this mail to the > list was not accepted for unknown reasons so I deleted it. Here is the > example I was talking about in the previous mail: > > import matplotlib > import pylab as p > > p.plot([1,2,3]) > p.xticks([1],["tick"]) > ax = p.gca() > fig = p.gcf() > > p.draw() > def print_texts(artist): > for t in artist.findobj(matplotlib.text.Text): > if t.get_visible() and t.get_text(): > print " %s @ %s" % (t.get_text(), t.get_position()) > > print "X-Axis" > print_texts(ax.xaxis) > print "Y-Axis" > print_texts(ax.yaxis) > This is my output using v1.1.1-rc2 X-Axis tick @ (1.0, 0.0) tick @ (0.0, 1.0) Y-Axis 1.0 @ (0.0, 1.0) 1.0 @ (1.0, 0.0) 1.5 @ (0.0, 1.5) 1.5 @ (1.0, 0.0) 2.0 @ (0.0, 2.0) 2.0 @ (1.0, 0.0) 2.5 @ (0.0, 2.5) 2.5 @ (1.0, 0.0) 3.0 @ (0.0, 3.0) 3.0 @ (1.0, 0.0) Strange indeed. Ben Root |