Hi everybody,

I want to plot a x versus y plot in Sage. Unfortunately , i do not know if plot() or list_plot() can do it. Until now, I used the FigureCanvasAgg object of the matplotlib library, but I would rather like to have the plot inside a sage notebook. Is there anyway to plot a x array, versus y array with Sage (having both same size)?

This is how I do it now in Sage:

from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.pyplot import figure, show

import numpy as np
# see http://linuxgazette.net/115/misc/andreasen/sunspots.dat to donwload the data.
data = np.loadtxt('/home/user/tmp/sunspots.dat')
year = data[:,0]
wolfer = data[:,1]

fig = figure()
ax = fig.add_subplot(111)
ax.plot(year, wolfer)
show()

Best,

Jose

--
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
URL: http://www.sagemath.org

Reply via email to