Hello all.

I'm trying to apply a transformation (Affine2D) to a text artist.  For
some reason the artist doesn't show up in the plot.  I have a simple
code here which demonstrates the problem.  Any ideas what I'm doing
wrong?

Thanks

Jack Liddle

from numpy import *
import matplotlib.pyplot as plt
from matplotlib.text import Text

fig = plt.figure()

from matplotlib.transforms import Affine2D,Transform
ax1 = fig.add_subplot(111)

#Something to plot
xs = linspace(0,1,100)
ys = xs**2
ax1.plot(xs,ys)

#The transformation
mytrans = Affine2D()
print mytrans
print isinstance(mytrans,Transform)


t = Text(0.5,0.5,"Problems?",transform=mytrans)
ax1.add_artist(t)
plt.show()

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to