cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
ram
ram
Level IV

How to use a color scheme in "Graphic script"?

HI All,

is there a way to use default color scheme for "add graphic script" when adding multiple lines and text?

e.g in below code i want to use default color scheme for lines and text instead of hard coded.

Motivation: I have to match the color of data to the lines and text, where my data is colored by a group.

Line Style( 0 );
Pen Color( 6 );
Pen Size( 2 );
Text Size( 10 );
Try( X Function( 315.4, y, Max( 0.452932059283821 ) ) );
Text Color( 6 );
Text( Erased, Right Justified, {315.4, -0.627776070148963}, Char( "90%" ) );

5 REPLIES 5

Re: How to use a color scheme in "Graphic script"?

The default JMP color scheme simply uses an index to determine the color so if you use integer color values in sequence as the index then you will duplicate the colors. Your example uses Pen Color( 6 ), so you are well into the index and not starting at the beginning so you color won't match the first color used by JMP.

ram
ram
Level IV

Re: How to use a color scheme in "Graphic script"?

Thank you Mark.= for reply.
will that approach also works if i have my own color defined? See below i have my own custom color theme defined as below.
Preferences(
Add Color Theme(
{"My Color Theme", {{0,0,205}, {255,140,0}, {34,139,34},{255,0,0},{0,191,255},{199,21,133},{255,215,0},{119,136,153},{50,205,50},{205,92,92},{148,0,211},{102,205,170},{205,205,193},{255,255,0},{0,255,255},{124,252,0},{218,165,32},{255,20,147},{255,218,185}}}
),
Categorical Color Theme( "My Color Theme" ),
Graph Marker size(7 ),
);

Re: How to use a color scheme in "Graphic script"?

I was referring to the behavior using the default JMP color scheme and the JMP color index values.

I honestly don't know but why don't you try using Pen Color( 6 ) and see if it is the default JMP color by that index or the color that you defined?

ram
ram
Level IV

Re: How to use a color scheme in "Graphic script"?

Hi Mark,

I checked using a counter but it only gives me default color which is different than my color theme. I can see my color theme is active in Prefrences and legends in data table.

Pen Color(ics) and text color(ics).

looks like index numbers are static in JMP they dont change with new user defined color theme. But it should change.

Re: How to use a color scheme in "Graphic script"?

I don't know if it should change. The color descriptors (e.g. a word like "red" or an index like 4) are convenient and apply to the default color scheme. Some things are supposed to be static or constant. A change might break other scripts that assume the default colors.

How are custom color schemes supposed to work? How are they supported?