next up previous contents index
Next: 5.4 Text Strings and Labels Up: 5 Plotting with IFEFFIT Previous: 5.2 Error Bars


5.3 Colors, Line Styles, and Other Attributes

IFEFFIT allows different colors for each trace as well as the background, the foreground (text strings and the box around the plot), and the optionally displayed grid. It also supports different styles of lines (solid, dashed, points, etc.) to be used for different x-y pairs. This section will explain how to use these options in detail.

There are a few different ways to specify colors for x-y traces, background, foreground, and optional grid. First and most simply, you can specify the color for each object directly by name:

  Ifeffit> plot(my.x,my.y, color=red, bg=white)
which will draw the x-y trace in red on a white background. This is probably the easiest way to get the colors you want. The available set of named colors is determined when the PGPLOT routines are installed, and are listed in the file rgb.txt in the PGPLOT directory. This file is usually very close to the standard X-Windows set of colors, so you can specify dodgerblue3 and bisque, but not teal. For other colors, you can specify the red-green-blue intensities in hexadecimal format, using the somewhat standard `#RRGGBB' format:
  Ifeffit> plot(my.x,my.y,color='#FF00FF')
will be magenta, for example.

If colors are not specified in the plot() command, the default values used will be taken from an internal ``color table''. The color table lists the colors used for background, foreground, grid, and then the traces in order that they are drawn, and can be displayed with either color(show) or show @colors. A typical output would look like this:

  Ifeffit> show @colors
  plot color table:
     bg   = white
     fg   = black
     grid = #CCBEE0
        1 = blue
        2 = red
        3 = darkgreen
        4 = black
   &vellip#vdots;
which means the first trace drawn would be in blue, the second in red, and so on. You can change the values in the color table using the color() command, like this:
  Ifeffit> color(fg = black, bg = white, grid = '\#AABB99')
  Ifeffit> color(1 = yellow, 2 = cyan)
  Ifeffit> color(3 = white, 4 = magenta)
which will reset the default colors to plot with. Such commands may be placed in a start-up file .ifeffit. For postscript output intended for a printer please note that a black background will use a lot of ink - a white background is recommended for hardcopies.

There are a few different line styles available as values for the style keyword. The supported line styles are given in Table 6 with examples shown in Figure 1. There is a fair selection of points available for the points and linespoints styles, which are specified by integer with points1, points2, linespoints12, etc, with examples of the available point types shown in Figure 2.


Table 6: Supported Plotting line styles for the plot() command. These can be specified with plot(..., style=lines) and so forth. The available point types are show in Figure 2.

Line Style
Description

solid
solid line
dashed dashed line
dotted dotted line
dot-dash mixed dot-dashed line
points a special marker at each point (see Figure 2)
linespoints solid line with a special markerd at each point

 

plot_styles.png

Figure 1: A selection of plotting line and points styles for IFEFFIT.
\begin{figure}\rule{4in}{1mm}
\end{figure}

plot_points.png

Figure 2: The plotting point types for IFEFFIT, as produced with syntax such as style=points3, and so forth. The linespoints types such as style=linespoints3 will show the same point type, joined with a solid line.
\begin{figure}\rule{4in}{1mm}
\end{figure}

The width of the lines for all traces and axes can be set with the linewidth keyword, which takes an integer value. Values between 1 to 5 are appropriate, and the default is 2.


next up previous contents index
Next: 5.4 Text Strings and Labels Up: 5 Plotting with IFEFFIT Previous: 5.2 Error Bars
Matt Newville
2004-02-09