Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
skyzvoir0001
Level III

Marker

How to set the legend in age=14 to a circle with no fill thru scripting?

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
mzwald
Staff

Re: Marker

Use a script like this to set the marker you prefer for your desired rows:

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
rows = dt << Select Where( :Age == 14 );
rows << Markers( 8 );

Then when you make any visuals, those markers will be applied.  Or if you prefer not to do through scripting you can do this:

1. Right click on the value in your data table you wish to set markers for

2. Select Matching Cells

3. From Row menu choose Markers and pick your marker from there

View solution in original post

Highlighted
pmroz
Super User

Re: Marker

If you click the red triangle and select save script you will see the necessary JSL commands to change the marker.  Here's an example:

dt = open("$sample_data/Car Physical Data.jmp");

dt << Graph Builder(
	Show Control Panel( 0 ),
	Variables( X( :Displacement ), Y( :Weight ), Overlay( :Country ) ),
	Elements( Points( X, Y, Legend( 3 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model(
				3,
				Properties( 2, {Marker( "Circle" )}, Item ID( "USA", 1 ) )
			)}
		)
	)
);

View solution in original post

7 REPLIES 7
Highlighted
mzwald
Staff

Re: Marker

Use a script like this to set the marker you prefer for your desired rows:

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
rows = dt << Select Where( :Age == 14 );
rows << Markers( 8 );

Then when you make any visuals, those markers will be applied.  Or if you prefer not to do through scripting you can do this:

1. Right click on the value in your data table you wish to set markers for

2. Select Matching Cells

3. From Row menu choose Markers and pick your marker from there

View solution in original post

Highlighted
skyzvoir0001
Level III

Re: Marker

Thanks! The markers on the plot changed. However, why didnt it change on the legend part?
Highlighted
skyzvoir0001
Level III

Re: Marker

Here is what i meant

 

 

Bivariate(
	Y( :height ),
	X( :weight ),
	SendToReport(
		Dispatch(
			{},
			"Bivar Plot",
			FrameBox,
			{Row Legend(
				age,
				Color( 1 ),
				Color Theme( "JMP Default" ),
				Marker( 0 ),
				Marker Theme( "" ),
				Continuous Scale( 0 ),
				Reverse Scale( 0 ),
				Excluded Rows( 0 )
			)}
		)
	)
);

ab = Data Table( "Big Class" );
ab << Select Where( :Age == 12 ) << Colors( 1 ) << Markers( 8 ) << clear select;

 

 

The row legend where age=12 did not change however the markers on the plot did.

 

Capture10.PNG

 

Highlighted
pmroz
Super User

Re: Marker

You can set individual markers manually by double-clicking on the legend.  In the popup window right click on the marker of interest and select Marker > (click on desired marker here).

Highlighted
skyzvoir0001
Level III

Re: Marker

Hey thanks for the reply! But is there a way to do it thru scripting? Im trying to make a script dynamically which copies the plots directly to a powerpoint and I’ve been stuck on how to change the legend part.
Highlighted
pmroz
Super User

Re: Marker

If you click the red triangle and select save script you will see the necessary JSL commands to change the marker.  Here's an example:

dt = open("$sample_data/Car Physical Data.jmp");

dt << Graph Builder(
	Show Control Panel( 0 ),
	Variables( X( :Displacement ), Y( :Weight ), Overlay( :Country ) ),
	Elements( Points( X, Y, Legend( 3 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model(
				3,
				Properties( 2, {Marker( "Circle" )}, Item ID( "USA", 1 ) )
			)}
		)
	)
);

View solution in original post

Highlighted
skyzvoir0001
Level III

Re: Marker

Thank you very much!
Article Labels

    There are no labels assigned to this post.