How to create a legend in Graph Builder which preserves row state coloring?

Jan 15, 2014 9:14 AM(4301 views)

I'm working on an asset performance analysis using multiple datasets. I've created custom colors (from ColorBrewer: Color Advice for Maps) for each asset and used the (anonymized) script below to set the Row State Color. It's a nice color scheme that fits my specific needs. The problem is that the Make Row Legend in the various platforms and Coloring schemes in Graph Builder will only allow selection of specific color schemes (JMP default, or 'Custom'). Also, all of the assets may not be in each of the datasets that I am analyzing.

Is there a way to create a legend or custom color scheme that preserves my scripted color scheme in Graph Builder?

Re: How to create a legend in Graph Builder which preserves row state coloring?

Graph Builder is not yet noticing when the data table color is suitable for the overlay coloring variable. That is, it would need to check that all the rows with "aaa" have the same color and no other rows have that color. Possible, but not there yet.

There are a couple alternatives though. One is to use a Value Color property, which tells Graph Builder that the colors are connected to values instead of rows. Here's a script for that:

Column("Asset")<<Set Property(

"Value Colors",

{"aaa"=RGB Color(255,217,47),

"bbb"=RGB Color(222,45,38),

"ccc"=RGB Color(35,139,69),

"ddd"=RGB Color(116,196,118),

"eee"=RGB Color(186,228,179),

"fff"=RGB Color(178,24,43),

"ggg"=RGB Color(8,81,156),

"hhh"=RGB Color(107,174,214),

"iii"=RGB Color(106,61,154),

"jjj"=RGB Color(202,178,214)

}

);

The other way, which may make more sense if you want to use the same colors elsewhere is to create a custom color theme in Preferences and make it the default. You may notice that some of the built-in color themes are from Color Brewer.

Finally, the second problem "all of the assets may not be in each of the data sets that I am analyzing" is a different issue. One work-around to get a non-existent data value to show up in a legend is to add it to the data set with a missing data value or 0 Freq value.

Re: How to create a legend in Graph Builder which preserves row state coloring?

Graph Builder is not yet noticing when the data table color is suitable for the overlay coloring variable. That is, it would need to check that all the rows with "aaa" have the same color and no other rows have that color. Possible, but not there yet.

There are a couple alternatives though. One is to use a Value Color property, which tells Graph Builder that the colors are connected to values instead of rows. Here's a script for that:

Column("Asset")<<Set Property(

"Value Colors",

{"aaa"=RGB Color(255,217,47),

"bbb"=RGB Color(222,45,38),

"ccc"=RGB Color(35,139,69),

"ddd"=RGB Color(116,196,118),

"eee"=RGB Color(186,228,179),

"fff"=RGB Color(178,24,43),

"ggg"=RGB Color(8,81,156),

"hhh"=RGB Color(107,174,214),

"iii"=RGB Color(106,61,154),

"jjj"=RGB Color(202,178,214)

}

);

The other way, which may make more sense if you want to use the same colors elsewhere is to create a custom color theme in Preferences and make it the default. You may notice that some of the built-in color themes are from Color Brewer.

Finally, the second problem "all of the assets may not be in each of the data sets that I am analyzing" is a different issue. One work-around to get a non-existent data value to show up in a legend is to add it to the data set with a missing data value or 0 Freq value.