cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
hogi
Level XIII

consistent marker and style control - type properties

I wished there was a consistent marker control in Graph Builder.

5 REPLIES 5
hogi
Level XIII

Re: consistent marker and style control

The wish is from August (2025):consistent marker control in Graph Builder 


It seems that someone else had the same wish, because here it is [1st part]!

 

A new era of style control in Graph Builder / JMP19:

Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" );
Graph Builder(
	Size( 590, 412 ),
	Graph Spacing( 4 ),
	Variables( X( :name ), Y( :weight ), Y( :height ), Color( :sex ) ),
	Elements( Position( 1, 1 ), Points( X, Y, Legend( 1 ) ) ),
	Elements( Position( 1, 2 ), Points( X, Y, Legend( 2 ) ) ),
	Column Switcher( :sex, {:age, :sex} ),
	SendToReport(
		Dispatch( {}, "400", ScaleBox,
			{Legend Model(
				1,
				Type Properties( 0, "Marker", {Marker( "Circle" )} )
			), Legend Model(
				2,
				Type Properties( 0, "Marker", {Marker( "FilledCircle" )} )
			)}
		))
);

 

In the Scripting Index, I could not find further documentation about the new feature:
https://jsl.jmp.com/search.html?q=Type+Properties

I guessit works along the idea:  if all items of one plot type have the same setting, then this setting is saved via Type Properties() to the Legend Group.

Important: default settings (marker = dot, color=black, line style: solid) are not saved * 

 
*) further details about this behavior can be found in a previous post:
https://community.jmp.com/t5/Discussions/Do-you-use-the-preferences/m-p/913487/highlight/true#M10733... 

hogi
Level XIII

Re: consistent marker and style control

Not only for Marker Styles ; )

Graph Builder(
	Size( 466, 312 ),
	Show Control Panel( 0 ),
	Graph Spacing( 4 ),
	Variables( X( :name ), Y( :weight ), Y( :height ), Overlay( :sex ) ),
	Elements( Position( 1, 1 ), Line( X, Y, Legend( 3 ) ) ),
	Elements( Position( 1, 2 ), Line( X, Y, Legend( 4 ) ) ),
	Column Switcher( :sex, {:age, :sex} ),
	SendToReport(
		Dispatch( {}, "400", ScaleBox,
			{Legend Model(
				4,
				Base( 0, 0, 0, Item ID( "F", 1 ) ),
				Base( 1, 0, 1, Item ID( "M", 1 ) ),
				Type Properties( 0, "H Line", {Line Style( "Dashed" )} )
			)}
		)
	)
);
hogi
Level XIII

Re: consistent marker and style control

The new feature for the lines is very helpful.

 

Looking at consistent marker control in Graph Builder , the new feature is exactly  proposed mode:

hogi_0-1764260193053.png

Very helpful will be the mode:

hogi_2-1764260289393.png

e.g. to generate the first graph with hollow markers and the second graph with filled markers.
or to use the left axis for hollow markers and the right axis for filled markers.

 

I just tried Type Properties( 0, "Marker", {Marker( "Hollow" )} ):

Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" );
Graph Builder(
	Variables( X( :name ), Y( :weight ), Color( :age) ),
	Elements( Points( X, Y, Legend( 1 ) ) ),
	SendToReport(
		Dispatch( {}, "400", ScaleBox,
			{Legend Model(
				1,
				Type Properties( 0, "Marker", {Marker( "Hollow" )} )	
			)}
	)
)	
);

 

... which doesn't produce the expected result (a graph with hollow markers)  - but provides another cool option *)

hogi_3-1764260427674.png



*) cool really ?!??! Why?
Just save the code of the generated graph and find: Marker( "" ) . It can be used to hide a markers very easily/efficiently.

Type Properties( 0, "Marker", {Marker( "" )} )

can be used to hide all markers (almost too extreme: the user doesn't have any chance to change the marker  / show them ).
 let's search for interesting use cases  ...

 

hogi
Level XIII

Re: consistent marker and style control

Type Properties(), in combination with colors: 
useful to batch assign a color to all entries - but one:

hogi_4-1764261205062.png

 

 

Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" );
Graph Builder(
	Variables( X( :name ), Y( :weight ), Color( :age ) ),
	Elements( Position( 1, 1 ), Points( X, Y, Legend( 1 ) ) ),

	SendToReport(
		Dispatch( {}, "400", ScaleBox,
			{
			Legend Model(
				1,
				Type Properties( 0, "Marker", { Line Color( 81 )} ),
				Properties( 1, {Line Color( 3 )}, Item ID( "15", 1 ) )
			)}
		))
);

 

hogi
Level XIII

Re: consistent marker and style control

Ever had that moment? You’re excited about a shiny new feature you just rolled out—feels like a game-changer.
But then… surprise! There’s an unintended side effect you didn’t see coming, and suddenly your “cool” feature turns into a silent killer for something else.
 
 
cool new feature: type properties.
victim: exploratory data analysis in JMP
 
JMP18:
 
JMP19:


What happened?
  • The user was not happy with the default settings and adjusted the color for one item in the legend.

  • in the exploratory data analysis, the user restricts the view to the item with the special setting

  • this is where the new feature gets activated:
from an earlyer post:


I guess it works along the idea:  if all items of one plot type have the same setting, then this setting is saved via Type Properties() to the Legend Group.


  • "all" -> even a single one. 
    JMP saved the specific setting as the default for the whole plot.
  • Later, when the user changes the selection in the data filter, this new setting is applied to all the other elements in the graph as well. By this inheritance of plot settings all elements get assimilated and share the same style.
    hogi_1-1764923956952.png

     



Recommended Articles