Question: Plot in procedure

I know that I have raised this question before, and also got some responses.

However, I cannot find the thread, and I'm still interested in what is going on.

I don't have a clue.

restart;
f:=proc(a)
plot(sin(x),x=0..Pi);
#plot(x^3,x=0..1);
#plot(undefined,x=0..1);
a^2   
end proc:

#Now try plotting what should be the parabola y = x^2 on the interval -1..1:
plot(f,-1..1,adaptive=false);
plot(f,-1..1);
plot(f(a),a=-1..1);

Try removing the first #-sign inside the procedure. Try also removing the other.

It is weird.

I apologize for asking this question once more and would be happy for a link to the earlier thread about this.

Please Wait...