When your dataset contains a large number of distinct categories or you require fine-grained control over the appearance of each data point, defining symbol properties (size, shape, and color) through a worksheet offers row-by-row customization. This method provides maximum flexibility for visualizing individual data points in line or scatter plots.
There are two ways to define symbols and colors from your worksheet:
-
Use separate columns (or rows) to define the symbol number and color individually.
-
Use a single column (or row) to define both the symbol and color together.
Alternatively, if your data naturally groups into categories or ranges, and you want to assign symbols and colors based on data values or text classes, consider using a Class Scatter Plot. For more guidance on this approach, please refer to the following 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
- Begin by ensuring your worksheet includes a column or row for symbol indices and another for colors. The symbol column/row must contain the numeric index corresponding to your desired symbol, and the color column/row must contain a predefined Grapher color.
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.
- \red
- \blue
- \green
- \cyan
- \yellow
- \magenta
- \black
- \gray
- \white
- \rgbrX
- \rgbgX
- \rgbbX
- \rgbaX
- \color(r,g,b,a)
- 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.
Comments
Is the RGB color implementation applicable to bar charts? It would appear not. I can use "Blue" in the color column, but get no response when I try "RGB(0,255,0)".
Can you add to suggestion box?
Thank you for bringing this to our attention. The option to use RGB and RGBA values in a color column was added in Grapher 15. I have updated this article to make that more clear. Regarding your question about bar charts, this feature is supported for all graphs types that support the use of a color column.
Check out the article How Can I Participate in Grapher's Preview Track? to learn how to gain access to this new feature.
Thanks!
Katie
Boom! Thanks Katie. In the mean time, I figured out how to quickly generate *.clr files. Very easy. In case anyone else needs an interim solution, making your own *.clr may be the ticket.
Please sign in to leave a comment.