pong wrote:
> Here is my script
>
> def shaded_area_plot(f,g,c,d,a,b):
> step = 0.01
from sage.ext.fast_eval import fast_float
f = fast_float(f)
g = fast_float(g)
> vf = [(x,f(x)) for x in srange(a, (b+step), step)]
> vg = [(x,g(x)) for x in srange(b, (a-step), -step)]
> sha =
Here is my script
def shaded_area_plot(f,g,c,d,a,b):
step = 0.01
vf = [(x,f(x)) for x in srange(a, (b+step), step)]
vg = [(x,g(x)) for x in srange(b, (a-step), -step)]
sha = polygon(vf + vg, rgbcolor='grey')
return(plot(f, (c,d)) + plot(g, (c,d), rgbcolor='red') + sha)
Most l
pong wrote:
> I defined a function which show the shaded area between the graphs of
> two functions over an interval (maybe such function already exist?).
> For example,
>
> plot_shaded_area(sin(x), cos(x), 1,2)
>
> show the shaded area between sine and cosine over [1,2]. Well, my
> script doesn
pong wrote:
> I defined a function which show the shaded area between the graphs of
> two functions over an interval (maybe such function already exist?).
> For example,
>
> plot_shaded_area(sin(x), cos(x), 1,2)
>
> show the shaded area between sine and cosine over [1,2]. Well, my
> script doesn