next up previous contents index
Next: 3.6 Graphic representation of Up: 3. Manual Previous: 3.4 List of commands   Contents   Index

Subsections


3.5 Description of the graphic objects




3.5.1 Devices

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 :

  1. By using absolute coordinates (i.e. pixels). This is done by the commands
    graphplot... and graphline...
  2. By using frames. This will determine a rectangular region in the windows and plots using frames will be possible only in this region. In this case also the coordinates are considered relatively to the extremal values of $x$ and $y$ for the frame (cf. 3.5.3).


3.5.2 Colors

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...



3.5.3 Frames

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 $x$ and $y$ 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 $0.1$ times and $0.9$ 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...



3.5.4 Strings

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.


next up previous contents index
Next: 3.6 Graphic representation of Up: 3. Manual Previous: 3.4 List of commands   Contents   Index
jmdr 2003-10-01