Hi JMP Community,
currently, I am writing a script that creates a plot template among other stuff in form of a pre-filled graph builder. Script below. The open graph builder is supposed to be used by the user who usually wants to have a look at other signals in addition to the existing 4 in the plot. So he usually starts to drags another column and drop it on top or at the bottom of the existing 4 signals.
The problem is that the new signals that are dropped onto the y axis manually are assigned standard colors. I would like all signals in the plot to have the same color that is defined by :State, no matter how many signals are dropped on and dragged off the y axis without having to manually assign the correct colors via the legend properties.
How to achieve that?
Thanks
Rob
Graph Builder(
Variables(
X( :Time ),
Y( :Signal 1 ),
Y( :Signal 2 ),
Y( :Signal 3 ),
Y( :Signal 4 ),
Color( :State )
),
Elements( Position( 1, 1 ), Line( X, Y, Legend( 4 ) ) ),
Elements( Position( 1, 2 ), Line( X, Y, Legend( 5 ) ) ),
Elements( Position( 1, 3 ), Line( X, Y, Legend( 6 ) ) ),
Elements( Position( 1, 4 ), Line( X, Y, Legend( 7 ) ) ),
SendToReport(
Dispatch( {}, "Signal 3", ScaleBox, {Format( "Best", 12 )} ),
Dispatch( {}, "Signal 4", ScaleBox, {Format( "Best", 12 )} ),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
4,
Properties( 0, {Line Color( 21 )}, Item ID( "Here", 1 ) ),
Properties( 1, {Line Color( 20 )}, Item ID( "are", 1 ) ),
Properties( 2, {Line Color( 41 )}, Item ID( "different", 1 ) ),
Properties( 3, {Line Color( 37 )}, Item ID( "labels", 1 ) ),
Properties( 4, {Line Color( 0 )}, Item ID( "for", 1 ) ),
Properties( 5, {Line Color( 32 )}, Item ID( "certain", 1 ) ),
Properties( 6, {Line Color( 1 )}, Item ID( "system", 1 ) ),
Properties( 7, {Line Color( 32 )}, Item ID( "states", 1 ) )
)}
)
)
)