Add Image Label to Graph<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />Hi,
Using JMP12 and an Expression column, how can I add an image label to a graph? The mouse over image is great, but I am having trouble getting the image label to stay visible to add to a journal, presentation, etc. Any suggestions? Thanks!
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << New Column( "Image",
Expression,
Set
Formula(
New Image(
Open(
"https://upload.wikimedia.org/wikipedia/en/thumb/6/6e/JMPlogo.png/250px-JMPlogo.png",
"png"
)
)
)
);
dt << Set Label Columns( :name, :Image );
dt << Select Where( :name == "LAWRENCE" ) << Label( 1 ) << Clear Select;
dt << Bivariate( Y( :height ), X( :weight ) );
// :name label is visible in graph, :Image label is not.
Re: Add Image Label to GraphThanks MS!
Re: Add Image Label to GraphYou can pin the label. To do it by hand just mouse over the marker and place the pointer on top of the label box to reveal the pin.
The same thing can be done by sending < to the FrameBox, but the parameters can be tricky to get right.
I would first pin and position the label by hand and then copy the script. See the example below:
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << New Column("Image", Expression, Formula(New Image(Open("$SAMPLE_IMAGES/pi.gif", gif))));
dt << Set Label Columns(:Image);
//dt << Select rows( label_row) << Label( 1 ) << Clear Select;
dt << Bivariate(
Y(:weight),
X(:height),
SendToReport(
Dispatch(
{},
"Bivar Plot",
FrameBox,
Add Pin Annotation(
Seg(Marker Seg(1)),
Index(39),
Index Row(-1),
Origin({70, 172}),
Offset({30, 16}),
Tag Line,
Font("Helvetica", 11, "Plain")
)
)
)
);
Current Report() << size window(475, 374);