Three kinds of graphic devices are known by funct : a X11-window, Postscript files and PNG files. Postscript files are created by the command defgraph_PS... and PNG files by the command defgraph_PNG.... These commands will create the files (cf. 3.7). For example,
defgraph_PNG W2 imag.png 600 350
will create a PNG image of width 600 and height 350 named W2 that will be stored in the file imag.png in the result directory. The name W2 will be used in funct to denote this image. The X11-window will be created if it is not present each time the object X is invoked. For example, the command
- funct -> clear X
will clear the X11 window if it is present, and create a blank one if not. So the name X is reserved for the X11 window.
There are two ways of drawing on a graphic object :
The command defcolor... will create color objects (the
default associated
color is black). To set the color of a color object, the command color...
is used. One associates a color to the pen on a graphic object with
the command setcolor...
A frame is created with the command defframe.... The command frame...
is then used to set the parameters of the frame.
This will indicate the
minimal and maximal values of and
and the x-tics and y-tics.
A frame can be drawn on a graphic object with the command setframe...
The frame will use a rectangular region of the corresponding window.
The defaultlimits of this region are between
times and
times the size of thedimensions of the
windows. This can be changed using the command setclip...
Plots can be done on a graphic object with respect to a frame using
the commands graphplot_c... and graphline_c...
It is possible to write character strings on graphics using frames. First a title can be put under the frame using the command of the same name :
- funct -> title X f My title is Here
will write "My title is Here" on the graphic X window below the rectangle defined by the frame f.
It is also possible to write inside frames, using the command putstring :
- funct -> putstring X f -NO My string is Here
will write "My string is Here" at the current position on the graphic X window with respect to the frame f. Here "-NO" is a modifier that moves slightly the position where the string begins on the graphic (allowed modifiers are "-O", "-E", "-S", "-N", "-NO", "-NE", "-SE", "-SO", with an obvious meaning). This is useful for points on geometric pictures.