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

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

4 REPLIES 4
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 guess: if all items of one plot type have the same setting, this setting is saved via Type Properties.

Important: default settings (marker= dot, color=black, line style: solid) are not saved 
further details about this behavior can be found in an 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 ) )
			)}
		))
);

 

Recommended Articles