The annotation Option
Including Coordinate Values
arguments to a plotting command
an Array of annotations
Use the annotation option to add descriptive text that appears when the pointer hovers over a curve or a point.
plot(sin(x), x=0..2*Pi, annotation="a sine curve");
The annotation option allows you to add descriptive text to a 2-D curve or point plot. The term "point plot" in this context means a collection of points that are treated as a single plot element, such as that created by the plots:-pointplot or dataplot command. The text, which can include mathematical expressions, appears when the pointer hovers over the plot element to which it is associated.
In the first calling sequence, t can be any Maple expression that can be typeset. See the plot/typesetting help page for more information about how such expressions can be specified. In this case, t is displayed whenever the pointer hovers over any part of the curve or point plot.
In the second calling sequence, A is an Array of n values, where n is the number of points defining a curve or in a single point plot. This form of the option does not work with curves consisting of disconnected parts, such as those formed using the discont option or the plots:-implicitplot command.
You can include the x-coordinate or y-coordinate associated with the location over which the pointer hovers in an annotation. To do this, use the name xcoordinate or ycoordinate as the annotation value or within a typeset structure as described on the plot/typesetting help page.
If you want to use a function of either the x-coordinate or y-coordinate, then use xcoordinate(p) or ycoordinate(p) where p is a procedure that accepts a numeric value and returns a numeric value, such as u->u^2.
To use a function of both coordinates, use xycoordinate(p) where p is a procedure that accepts two numeric values (the x-coordinate and y-coordinate, respectively) and returns a numeric value, such as (u,v)->u*v.
The number of digits displayed for the x-coordinate or y-coordinate can be specified by adding the digits=n option after the procedure p. Note that p can be omitted, as in xcoordinate(digits=5).
Add an annotation to a curve.
plot⁡x2,x=0..1,annotation=typeset⁡the function ,x2
Add an annotation to each point in a data plot.
Include coordinate values.
plot⁡x2,x=0..1,annotation=typeset⁡the square of ,xcoordinate, is ,ycoordinate
Use a function of the coordinate values and specify the number of digits.
plot⁡x2,x=0..1,annotation=typeset⁡the sum of x and y coordinates is ,xycoordinate⁡x,y↦x+y,digits=5
The annotation option was introduced in Maple 2017.
For more information on Maple 2017 changes, see Updates in Maple 2017.
Download Help Document
What kind of issue would you like to report? (Optional)