Question: Executing Sequential Procedures Properly

I have the following code in three document blocks on a document page.

> test1 := proc () setoptions(title = `My Plot`) end proc;
> plot1 := proc () with(plots); test1(); plot(x^2, x = 0 .. 2) end proc;
> plot1();

When run from a restart, it will not execute to give me a plot with a title. If I immediately re-execute the test1() procedure followed by the plot1() call, I get a plot with a title.

What am I missing, and how do I fix this to get what I want (a plot with a title)?



Please Wait...