Function:
labelledcontourplot - contour plot with labelled contours
Calling sequence:
labelledcontourplot(expr, x=a..b, y=c..d, opts)
labelledcontourplot(f, a..b, c..d, opts)
Parameters:
expr
- expression in variables
x
and
y
x, y
- names
a, b
- real constants
c, d
- real constants, or (in the first calling sequence) expressions that may depend on
x
.
f
- real-valued function of two variables
opts
- options
Description:
-
This function is similar to
contourplot
in the
plots
package, except that it puts a text label near each contour, giving the value of the expression or function on that contour.
-
For each contour value, the label appears near the farthest-right portion of the contour with that value. The label is in fixed-point format with two decimal places (as produced by
printf
with the "%3.2f" format string). It may not be the exact contour value, but usually is fairly close to it.
-
No attempt is made to prevent labels from overlapping. This may be remedied to some extent by increasing the size of the plot (as this does not affect the size of the text) or decreasing the number of contours.
-
In contrast to
contourplot
, this command does not have a parametric version, nor can you plot a set of expressions. To combine several of these plots (or combine them with other types of plot), use
display
from the
plots
package.
-
Besides the usual options of
contourplot
, you may use a
font
option to set the font for the labels, and a
textcolour
or
textcolor
option to set the colour for the labels. Any
colour
or
color
option affects the contours, but not the labels.
-
This function is part of the
Maple Advisor Database
library.
Examples:
>
labelledcontourplot(x^2+y^2,x=-2..2,y=-2..2,axes=boxed);
>
labelledcontourplot(x^2+y^2,x=0..1,y=0..sqrt(1-x^2),filled=true);
>
F:= (s,t) -> s-t:
labelledcontourplot(F,0..1,0..1,colour=blue,textcolour=red,font=[HELVETICA,BOLD,10]);