Previous: Text String Format, Up: Fonts and Markers


A.5 Available marker symbols

The GNU libplot library supports a standard set of marker symbols, numbered 0...31. A marker symbol is a visual representation of a point. The libplot marker symbols are the symbols that the graph program will plot at each point of a dataset, if the ‘-S’ option is specified.

Like a text string, a marker symbol has a font size. In any output format, a marker symbol is guaranteed to be visible if its font size is sufficiently large. Marker symbol #0 is an exception to this: by convention, symbol #0 means no symbol at all. Marker symbols in the range 1...31 are defined as follows.

  1. dot
  2. plus (+)
  3. asterisk (*)
  4. circle
  5. cross
  6. square
  7. triangle
  8. diamond
  9. star
  10. inverted triangle
  11. starburst
  12. fancy plus
  13. fancy cross
  14. fancy square
  15. fancy diamond
  16. filled circle
  17. filled square
  18. filled triangle
  19. filled diamond
  20. filled inverted triangle
  21. filled fancy square
  22. filled fancy diamond
  23. half filled circle
  24. half filled square
  25. half filled triangle
  26. half filled diamond
  27. half filled inverted triangle
  28. half filled fancy square
  29. half filled fancy diamond
  30. octagon
  31. filled octagon

The interpretation of marker symbols 1 through 5 is the same as in the well known Graphical Kernel System (GKS).

By convention, symbols 32 and up are interpreted as characters in a certain text font. For libplot, this is simply the current font. But for the graph program, it is the symbol font selected with the ‘--symbol-font-name’ option. By default, the symbol font is the ZapfDingbats font except in graph -T png, graph -T pnm, graph -T gif, graph -T pcl, graph -T hpgl and graph -T tek. Those variants of graph normally have no access to ZapfDingbats and other Postscript fonts, so they use the HersheySerif font instead.

Many of the characters in the ZapfDingbats font are suitable for use as marker symbols. For example, character #74 is the Texas star. Doing

     echo 0 0 1 2 2 1 3 2 4 0 | graph -T ps -m 0 -S 74 0.1 > plot.ps

will produce a Postscript plot consisting of five data points, not joined by line segments. Each data point will be marked by a Texas star, of a large font size (0.1 times the width of the plotting box).

If you are using graph -T pcl or graph -T hpgl and wish to use font characters as marker symbols, you should consider using the Wingdings font, which is available when producing PCL 5 or HP-GL/2 output. Doing

     echo 0 0 1 2 2 1 3 2 4 0 |
         graph -T pcl -m 0 --symbol-font Wingdings -S 181 0.1 > plot.pcl

will produce a PCL 5 plot that is similar to the preceding Postscript plot. The Wingdings font has the Texas star in location #181.