- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
How do I change graph builder color in JSL?
Hi all,
I made several Graph Builders below with JSL.
This is the syntax for dividing colors based on the column :XX.
But when I made several graphs, all of them came out the same color as "blue."
I want to give different colors for each graph builder, what options are available?
gb1 = dt <<
Graph Builder(
Size( 1200, 600 ),
Variables(
X( :A1, Position( 1 ) ),
Y( :Y ),
Color( :XX )
)
);
gb2 = dt <<
Graph Builder(
Size( 1200, 600 ),
Variables(
X( :A2, Position( 1 ) ),
Y( :Y ),
Color( :XX )
)
);
gb3 = dt <<
Graph Builder(
Size( 1200, 600 ),
Variables(
X( :A3, Position( 1 ) ),
Y( :Y ),
Color( :XX )
)
);
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How do I change graph builder color in JSL?
The Color() element indicates to apply different colors to different values of the color column. It does not specify the color it's self. To change the color in JSL, the best thing to do, is to interactively make the changes you want, and then to have JMP show you the JSL that will recreate the graph as you have created. Here is a rework of your code to show a different color for each graph
Names Default To Here( 1 );
Graph Builder(
Size( 1164, 556 ),
Variables( X( :A1 ), Y( :Y ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
1,
Properties( 0, {Line Color( "green" )}, Item ID( "weight", 1 ) )
)}
)
)
);
Graph Builder(
Size( 1164, 556 ),
Variables( X( :A2 ), Y( :Y ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
1,
Properties( 0, {Line Color( "Blue" )}, Item ID( "weight", 1 ) )
)}
)
)
);
Graph Builder(
Size( 1164, 556 ),
Variables( X( :A3 ), Y( :Y ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
1,
Properties( 0, {Line Color( "Red" )}, Item ID( "weight", 1 ) )
)}
)
)
);
Additionally, please use the to enter JSL in your discussions. It makes it much easier for Community Members to read the JSL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How do I change graph builder color in JSL?
The Color() element indicates to apply different colors to different values of the color column. It does not specify the color it's self. To change the color in JSL, the best thing to do, is to interactively make the changes you want, and then to have JMP show you the JSL that will recreate the graph as you have created. Here is a rework of your code to show a different color for each graph
Names Default To Here( 1 );
Graph Builder(
Size( 1164, 556 ),
Variables( X( :A1 ), Y( :Y ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
1,
Properties( 0, {Line Color( "green" )}, Item ID( "weight", 1 ) )
)}
)
)
);
Graph Builder(
Size( 1164, 556 ),
Variables( X( :A2 ), Y( :Y ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
1,
Properties( 0, {Line Color( "Blue" )}, Item ID( "weight", 1 ) )
)}
)
)
);
Graph Builder(
Size( 1164, 556 ),
Variables( X( :A3 ), Y( :Y ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
1,
Properties( 0, {Line Color( "Red" )}, Item ID( "weight", 1 ) )
)}
)
)
);
Additionally, please use the to enter JSL in your discussions. It makes it much easier for Community Members to read the JSL.