---------- Forwarded message ----------
From: Scott Sinclair <scott.sinclair...@gmail.com>
Date: 17 May 2011 14:52
Subject: Re: [Matplotlib-users] result in the graph
To: Waleria <waleriantu...@gmail.com>


On 17 May 2011 14:35, Waleria <waleriantu...@gmail.com> wrote:
> Hello all,
>
> I have this code: http://dpaste.com/543369/ (part that generates the chart)
> . So i need to show a result in the graph, i have the line 69 (variable
> x_sqr) in code, i need to show tthe result of variable in the graph. How can
> i do this?

How about:

import matplotlib.pyplot as plt

x_sqr = 42.42

fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot(range(5))
ax.text(3, 2, r'x$^2$ = %.2f' % x_sqr)
plt.show()

Cheers,
Scott

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to