cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
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
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

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
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

skyzvoir0001
Level III

Re: Marker

Thanks! The markers on the plot changed. However, why didnt it change on the legend part?
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

 

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).

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.
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 ) )
			)}
		)
	)
);
skyzvoir0001
Level III

Re: Marker

Thank you very much!