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
hogi
Level XII

label points - multiple plots

Is it possible to show labels just in one subplot, e.g. the right one, but not the left one?
... and just for a single points plot per Framebox?

 

Something like No Labels - forced! to deactivate the labels for plots where don't need them.

hogi_1-1719915417504.png

 

 

hogi_0-1719915313044.png

 

 

 

Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
gb = dt << Graph Builder(
	Variables( X( :sex ), X( :height ), Y( :weight ), Overlay( :sex ) ),
	Elements( Position( 1, 1 ), Points( X, Y, Legend( 3 ) ) ),
	Elements(
		Position( 2, 1 ),
		Points( X, Y, Legend( 4 ) ),
		Smoother( X, Y, Legend( 5 ) ),
		Points( X, Y, Legend( 9 ) )
	)
);

Data Table( "Big Class" ) << Clear Select << Select Rows( Index( 6, 9 ) ) << Label;


// Unlabel column: name
Data Table( "Big Class" ):name << Label( 1 );

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: label points - multiple plots

A workaround but you can use Label by Value and then customize the format (set width to 0)

jthi_0-1719915891888.png

If you need a script you won't won't directly get one (at least not with this method) and you have to make small modifications (I added 0 and -1 to label format)

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
gb = dt << Graph Builder(
	Size(826, 660),
	Show Control Panel(0),
	Variables(X(:sex), X(:height), Y(:weight), Overlay(:sex)),
	Elements(Position(1, 1), Points(X, Y, Legend(3), Label("Label by Value"), Label Format("Custom", Formula(value), 0, -1))),
	Elements(Position(2, 1), Points(X, Y, Legend(4)), Smoother(X, Y, Legend(5)), Points(X, Y, Legend(9)))
);

dt << Select Rows(6 :: 9) << Label(1) << Clear Select;
dt:name << Label(1);

jthi_1-1719916022590.png

 

-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: label points - multiple plots

A workaround but you can use Label by Value and then customize the format (set width to 0)

jthi_0-1719915891888.png

If you need a script you won't won't directly get one (at least not with this method) and you have to make small modifications (I added 0 and -1 to label format)

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
gb = dt << Graph Builder(
	Size(826, 660),
	Show Control Panel(0),
	Variables(X(:sex), X(:height), Y(:weight), Overlay(:sex)),
	Elements(Position(1, 1), Points(X, Y, Legend(3), Label("Label by Value"), Label Format("Custom", Formula(value), 0, -1))),
	Elements(Position(2, 1), Points(X, Y, Legend(4)), Smoother(X, Y, Legend(5)), Points(X, Y, Legend(9)))
);

dt << Select Rows(6 :: 9) << Label(1) << Clear Select;
dt:name << Label(1);

jthi_1-1719916022590.png

 

-Jarmo
hogi
Level XII

Re: label points - multiple plots

cool workaround : )
Label by value - which shows less than No Label.


Interesting that Advanced log doesn't accept the width=0 setting ?!?
-> added to the log:
Actions missed by Advanced Log/Workflow Builder