Hello everyone,

I was wondering whether there is a way to fill the region between two plots
using the sage "plot" command.
I know how to do it in matplotlib and I'm appending a script which does
exactly that with matplotlib 0.98.5.

Thanks in advance.

Fabio

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

from pylab import figure,show
import numpy as np

x=np.arange(-np.pi,np.pi,0.01)

y1=np.sin(x)
y2=x-x**3/(2*3)+x**5/(5*4*3*2)
fig=figure()
ax=fig.add_subplot(1,1,1)
ax.plot(x,y1,color='r')
ax.plot(x,y2,color='black')
ax.fill_between(x,y1,y2)
ax.grid(True)
show()

Reply via email to