The legend command takes two arguments and an optional third. The arguments are:
For example, to put "hello" to the upper left of the point
(1,1):
Input:
or
Input:
Output:
The display command changes the properties of graphics; the same properties that can also be changed with the display and color parameters. (See section 11.3.2.) The color command is the same as the display command.
The display command can draw objects with specified
properties. In this case, the first argument will be a command to
create the object and the second argument will be a value for the
display or color parameter.
Both
Input:
and
Input:
draw
Output:
Similarly, both
Input:
and
Input:
draw
Output:
The display command can also take a second argument of
hidden_name. By default, if a geometric object is named,
the drawing is labeled.
Input:
Output:
Creating the object with the display command and the
hidden_name argument will draw it without the label.
Input:
Output:
The display command can also be used without drawing an object, such as display(hidden_name) or display(filled). In this case it will be a global command; the display effect will apply to all objects afterwards. Entering display(0) will reset the display parameters; afterwards, for example, the colors will be black, the figures won’t be filled, and the objects will have labels.