cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
Choose Language Hide Translation Bar
lala
Level VIII

How can display the specified label on a 3D scatter plot?

For example, generate the following 3D graph in Big Class.jmp. How do you make each point display its own age label?

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Sort( By( age ), Order( Ascending ), replace table );
ca = "nn";
New Column( ca );
Column( ca ) << Formula(
	If( Row() == 1 | age != Lag( age, 1 ),
		r = Row();
		1;
	,
		Row() - r + 1
	)
);
dt << run formulas;
Column( ca ) << deleteFormula;
p1 = dt << Scatterplot 3D(
	Y( :height, :weight, :nn ),
	Weight( :age ),
	Coloring( :sex ),
	Sized Points( 1 ),
	Legend( 9 ),
	Frame3D(
		Set Graph Size( 1066, 741 ),
		Legend( 1 ),
		Set Grab Handles( 0 ),
		Set Rotation( 5.79529088089731, 66.3611426483183, -5.39187559662059 ),
		Set Marker Quality( 1 )
	)
);

Thanks!

2024-02-27_16-07-05.png

 

3 REPLIES 3
jthi
Super User

Re: How can display the specified label on a 3D scatter plot?

Remove Label column property from name, add label property to age, add label row state to all rows and select those rows

jthi_0-1709022562782.png

you could also select something from 3d scatterplot to make them appear

jthi_2-1709022755808.png

 

If you just want to see those on hover over, skip row states

jthi_1-1709022687136.png

 

-Jarmo
lala
Level VIII

Re: How can display the specified label on a 3D scatter plot?

How to adjust the circle size in 3D Scatterplot using JSL?There is no recording in the recorded source code.

 

Thanks!

2024-02-29_13-54-16.png

jthi
Super User

Re: How can display the specified label on a 3D scatter plot?

If nothing else, you can get the reference to the slider box and use <<Set

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Iris.jmp");
obj = dt << Scatterplot 3D(
	Y(:Sepal length, :Sepal width, :Petal length, :Petal width)
);
wait(1);
Report(obj)[SliderBox(1)] << Set(0.01);

but there is also Frame3D(Set Marker Scale)

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Iris.jmp");
obj = Scatterplot 3D(
	Y(:Sepal length, :Sepal width, :Petal length, :Petal width)
);
wait(1); obj << Frame3D(Set Marker Scale(10));
-Jarmo