On Tue, May 19, 2009 at 9:13 AM, Greg <[email protected]> wrote:
>
> Hi, I have a set of data that I want to create a contour plot for.
> Since I have the data and not the function that created the data, I
> cannot use contour_plot. Matplotlib has a function "contour" that
> accepts a vector of data and does exactly what I want expect I cannot
> get it to work in Sage notebook.
>
> I tried using the example given on the Matplotlib webpage which
> amounts to:
> import matplotlib.pyplot as plt
> plt.contour(Z)
> plt.show()
>
> (where Z is my data). However nothing shows up. Any suggestions?
>
> thanks, Greg
Here is an example from the Sage reference manual on how to use
matplotlib from sage:
sage: from pylab import *
sage: t = arange(0.0, 2.0, 0.01)
sage: s = sin(2*pi*t)
sage: P = plot(t, s, linewidth=1.0)
sage: xl = xlabel('time (s)')
sage: yl = ylabel('voltage (mV)')
sage: t = title('About as simple as it gets, folks')
sage: grid(True)
sage: savefig('sage.png')
William
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---