Hello,
in the code bellow i am trying to achieve a very simple thing: I'd like
to call the routine "annotate" to place a text on my plot with arguments
supplied by means of a dictionary.
Is there a way how to do this?
Petr
--------------------------------
from pylab import *
fig = figure()
ax = fig.add_subplot(111, xlim=(-1,5), ylim=(-3,5))
t = nx.arange(0.0, 5.0, 0.01)
s = nx.cos(2*nx.pi*t)
ax.plot(t, s, lw=3, color='purple')
ax.annotate('text', xy=(1,0.5))
ax.annotate('text', xy=(2,0.5), rotation=45)
# But this does not work:
# opts = dict(rotation=45)
# ax.annotate('text', xy=(3,2), opts)
#
# and nor does this:
# opts = {'xy':(3,2),'rotation':45}
# ax.annotate('text',opts)
show()
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users