There are two ways to define a specific symbol and color for each point in a Grapher line/scatter plot. The symbol number and color can be defined in separate columns or rows within a worksheet. You can also define symbols and colors from a single shared column or row.
If you are assigning the symbol and color based on a data value or text class, see the articles:
- Use bins or classes for different symbols in Grapher
- Color scatter plot symbols based on numeric data values in Grapher
Define colors and symbols from separate worksheet columns/rows
- First, ensure that your worksheet contains both a symbol column/row and a color column/row as shown below. The symbol column/row must contain the numeric index associated with your desired symbol and the color column must contain one of the predefined colors in Grapher.
It's also possible to use RGB or RGBA values in the color column.
These can be specified in the following formats:
- RGB(255, 255, 255)
- \COLOR(255, 255, 255, 255)
- R255 G255 B255
- R255 G255 B255 A255
- \RGBR255 \RGBG255 \RGBB255
- Select the plot in the Object Manager.
- If your plot contains lines, on the Line page in the Property Manager, change your Color method to Color variable, and select the worksheet column or row containing your desired colors.
- If your plot contains symbols, on the Symbol page in the Property Manager:
- Click None in the Symbol variable field and select the column or row containing your desired symbol indices. (Note: If the Symbol variable field is not visible, this option is not available for your plot type.)
- In the Color variable field, click None to select the worksheet column or row containing the values for your symbol colors.
Each symbol and/or line will now use the defined color and/or symbol from the worksheet.
Define colors and symbols from within a single column/row
Note: The method below uses labels as symbols, so you won’t be unable to add labels to your symbols if you use this method.
- First, define each symbol color using the math text syntax for text colors.
- Next, the symbol character must be added to the same worksheet cell with a space between the color and the character. To determine which characters are available as symbols, use the Windows character map.
- Click the Windows start button, type charmap in the search box and press ENTER.
- In the Character Map dialog, change the Font to the desired symbol set, such as GSI Default Symbols.
- Select the symbol shape you want and click the Select and Copy buttons.
- In Grapher’s worksheet, click in the cell that should contain the symbol and insert your cursor after the space after the color name.
- Click the Home | Clipboard | Paste command or press CTRL+V on the keyboard. The appropriate keyboard character for the symbol is added to the cell.
- Select the line/scatter plot in the Object Manager.
- On the Symbol page in the Property Manager, change the Symbol frequency to 0.
- On the Labels page, change the Label variable to the column with the symbols and colors defined.
- Set both the Horizontal alignment and the Vertical alignment to Center, so the label appears right where the symbol was.
- Verify the X offset and Y offset are set to 0.
- In the Label Format section, expand Font and set the Face to the symbol set you picked your symbols from in the character map. So, if you used GSI Default Symbols there, set the Face here to GSI Default Symbols.
Updated May 2023