cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
hogi
Level XI

color settings for "missing" values

If there is a value missing in the data table, "missing" shows up as the first entry in the legend - and shifts all colors by 1

 

 

Is it possible to define the value order in the column preferences such that "missing" is last?

Is it possible to define this as a standard via preferences?

 

Or even better: Is it possible to define a fixed color for "missing" values - such that it doesn't interfere at all with the standard color order?

 

hogi_0-1667546325030.png

hogi_1-1667546340230.png

 

 

 

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

dt << Graph Builder(
	Size( 534, 464 ),
	Show Control Panel( 0 ),
	Graph Spacing( 4 ),
	Variables( X( :weight ), Y( :height ), Overlay( :sex ) ),
	Elements( Points( X, Y, Legend( 9 ) ), Smoother( X, Y, Legend( 10 ) ) )
);

wait(2);

dt:sex[5]="";
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: color settings for "missing" values

What you need to do is to set the Value Colors for the column in question.  The limitation is that you do not want to use the #1 color in your choice.  Reserve that for the Missing Category

names default to here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

:sex << set property("Value Colors", {"F" = "blue", "M" = "green"});

dt << Graph Builder(
	Size( 534, 464 ),
	Show Control Panel( 0 ),
	Graph Spacing( 4 ),
	Variables( X( :weight ), Y( :height ), Overlay( :sex ) ),
	Elements( Points( X, Y, Legend( 9 ) ), Smoother( X, Y, Legend( 10 ) ) )
);

wait(2);

dt:sex[5]="";

txnelson_0-1667569766497.png

txnelson_1-1667569816152.png

 

 

Jim

View solution in original post

8 REPLIES 8
jthi
Super User

Re: color settings for "missing" values

You could use Value Colors column property but... if you use it it seems like the missing value color in the theme will be ignored. I would say this is a bug and should be reported to JMP support.

 

By default the user's preference color theme should be used AND the missing values should be with the desired color, but for some reason this doesn't seem to be the case

 

jthi_1-1667550441731.png

 

With Value Colors (missing color will be ignored)

jthi_0-1667550429359.png

 

Without Value Colors (weird shift as the missing color is used but first color is still skipped)

jthi_3-1667550502469.png

 

I'm using Universal color theme here

jthi_2-1667550463944.png

 

 

-Jarmo
txnelson
Super User

Re: color settings for "missing" values

Apparently you have the option, "Include Missing Categories" selected as your default.  You can tun this off by unselecting it under the red triangle.

txnelson_0-1667551024078.png

Or the option can be set as a default  as a preference

txnelson_1-1667551231682.png

The order of Missing Categories can also be adjusted under the "Legend Settings" selection under the red triangle

txnelson_2-1667551770917.png

 

Jim
hogi
Level XI

Re: color settings for "missing" values

Hi Jim,

thanks for the explanations.

 

To be honest, I don't understand which part of it solves my problem:


and shifts all colors by 1

 I face this problem very often in JMP and want to solve it in general.

 

Below is another example, which makes the problem slightly more visible:

"sex" and "sex_2" are "the same", there is just one value missing in one cell of the data table.

I expect the color schemes to be the same (*) "by default" - without any additional effort. 

 

How can I configure JMP to make it behave like expected (*)?

 

hogi_1-1667566261681.png

View more...
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

dt << New Column( "sex_2", Character, set each value( :sex ) );

New Window( "compare",
	H List Box(
		dt << Graph Builder(
			Size( 534, 464 ),
			Show Control Panel( 0 ),
			Graph Spacing( 4 ),
			Variables( X( :weight ), Y( :height ), Overlay( :sex ) ),
			Elements( Points( X, Y, Legend( 9 ) ), Smoother( X, Y, Legend( 10 ) ) )
		), 

		dt << Graph Builder(
			Size( 534, 464 ),
			Show Control Panel( 0 ),
			Graph Spacing( 4 ),
			Variables( X( :weight ), Y( :height ), Overlay( :"sex_2" ) ),
			Elements( Points( X, Y, Legend( 9 ) ), Smoother( X, Y, Legend( 10 ) ) )
		)
	)
);



Wait( 2 );

dt:sex[5] = "";

 

 

 

 

txnelson
Super User

Re: color settings for "missing" values

What you need to do is to set the Value Colors for the column in question.  The limitation is that you do not want to use the #1 color in your choice.  Reserve that for the Missing Category

names default to here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

:sex << set property("Value Colors", {"F" = "blue", "M" = "green"});

dt << Graph Builder(
	Size( 534, 464 ),
	Show Control Panel( 0 ),
	Graph Spacing( 4 ),
	Variables( X( :weight ), Y( :height ), Overlay( :sex ) ),
	Elements( Points( X, Y, Legend( 9 ) ), Smoother( X, Y, Legend( 10 ) ) )
);

wait(2);

dt:sex[5]="";

txnelson_0-1667569766497.png

txnelson_1-1667569816152.png

 

 

Jim
hogi
Level XI

Re: color settings for "missing" values

Hi Jim,

you are right, this is indeed the most robust way to do it: minimum effort, but no surprises anymore

That was my first attempt to solve the issue, but ...


Ah:

What you need to do is to set the Value Colors for the column in question.
The limitation is that you do not want to use the #1 color in your choice.  Reserve that for the Missing Category


Many thanks. Nice workaround for this secon-order issue

 

 

Next step:

Where is the column property setting hiding to define the "Value Markers"?

txnelson
Super User

Re: color settings for "missing" values

There is not an equivalent "Value Markers" to the "Value Colors".  Markers are set either by Row State

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Marker by Column( :sex );
Graph Builder(
	Variables( X( :height ), Y( :weight ), Color( :age ) ),
	Elements( Points( X, Y, Legend( 1 ) ) )
);

txnelson_0-1667645626028.png

Or by specific changes to elements within the Graphic platform

names default to here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Graph Builder(
	Size( 525, 454 ),
	Show Control Panel( 0 ),
	Variables( X( :weight ), Y( :height ), Color( :sex ) ),
	Elements( Points( X, Y, Legend( 9 ) ), Smoother( X, Y, Legend( 10 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model(
				9,
				Properties(
					0,
					{Marker( "FilledWide" ), Marker Size( 6 )},
					Item ID( "F", 1 )
				)
			)}
		)
	)
);

txnelson_1-1667645955985.png

 

Jim
hogi
Level XI

Re: color settings for "missing" values

Oh, I am a bit surprised that the column propery: Value Markers is not yet available.


Here is the wish: 
https://community.jmp.com/t5/JMP-Wish-List/new-Column-Property-Value-Markers/idi-p/565358

 

Marker by Column().

I guess there are some applications where it makes sense, but there are so many disadvantages ...

hogi
Level XI

Re: color settings for "missing" values


@hogi wrote:

... Value Markers is not yet available.
Here is the wish: 
https://community.jmp.com/t5/JMP-Wish-List/new-Column-Property-Value-Markers/idi-p/565358



Unfortunately, the wish got rejected
nobody needs Value Markers ?