There are two workflows that can be used to define a specific symbol and color for each point in a Grapher line/scatter plot. The first workflow requires that the symbol number and color be defined in separate columns or rows in the worksheet. The second option requires that both the symbol and the color be defined in a single 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
Method 1: Defining the color and symbol in separate 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.
In Grapher 15 and newer, instead of color names, 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, click in the Color column field and select the column or row containing your desired colors.
- If your plot contains symbols, on the Symbol page in the Property Manager,
- Click in the Symbol variable field and select the column or row containing your desired symbol indices.
- Expand the Fill section, click in the Color column field and select the column or row containing your desired colors.
Each symbol and/or line will now use the defined color and/or symbol from the worksheet.
Method 2: Defining the symbol and color in a single column/row
Note: The method below uses the label as the symbol, so you will be unable to add a label to the symbol using 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, you can 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 March 2020