This post is to help anyone who is just as frustrated about typesetting in plots
as I was before I solved my problem. (Note: the technique works with the version
2020 and newer and may work with earlier versions.)
Why? Because there is no obvious help in Maple showing what works. (And if folks
can improve what I have posted, please do so. At least when someone executes
a search for this type of problem, they might see the best approach.)
Goal: typeset a name of a function in any text of a plot.
Approach: According to help, '?plot, typesetting', one should use the
option(procedure?) typeset. For example:
> |
!["restart; plots:-setoptions(size = [400, 200]): `f__1`(x) :=cos(x)*(e)^(-(x^(2))/(4)) : p1 := plot(`f__1`(x), x = -5..5, legend = typeset("function ", `f__1`(x) ) );"](/view.aspx?sf=224838_post/17187e3a04f04cbe99ec3021ad4ec6c2.gif)
|
However, what I want in the legend is the expression not the evaluated
expression. Entering the name with single quotes around the expression leads to this:
> |

|
which is great, except that when I wish to redisplay the plot
> |

|
the expression is evaluated.
According to the code completion capability of Maple, the procedure
"Typesetting:-Typeset" exists, and it does not evaluate the function:
> |

|
except there is no help regarding this procedure.
It appears that the procedure operates only on one item.
Solution: Hence, the ultimate solution for my problem is to still use the typeset
option, but Typeset any expression.
> |

|
Again, if you can contribute to this post, I would appreciate it.
|