cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
Prokaryote
Level II

How do I create 2 or more legend boxes in Graph Builder and place each in the respective framebox/scalebox?

I've highlighted a legend box that contains 2 legend models.  I'd like to put the first legend model in a stand alone legend box and place that legend box in the first framebox.  For the second legend model, I'd like to put it in a stand alone legend box and place that second legend box in the second framebox.  Is this possible by manipulating the graphbuilder script? 

Thanks!

 

ih_0-1684351521207.png

 

12 REPLIES 12
Prokaryote
Level II

Re: How do I create 2 or more legend boxes in Graph Builder and place each in the respective framebox/scalebox?

Hi @hogi, thanks for checking in.  No, I'm afraid not.   

jthi
Super User

Re: How do I create 2 or more legend boxes in Graph Builder and place each in the respective framebox/scalebox?

You can script this with images but they are just images

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
gb = dt << Graph Builder(
	Size(900, 600),
	Show Control Panel(0),
	Show Legend(1), // left here to check correct colors
	Graph Spacing(20),
	Variables(
		X(:lot_id),
		Y(:NPN1),
		Y(:PNP1, Position(1)),
		Y(:PNP2, Position(1)),
		Y(:NPN2),
		Y(:PNP3, Position(2)),
		Y(:IVP1, Position(2))
	),
	Elements(Position(1, 1), Smoother(X, Y(1), Y(2), Y(3), Legend(3))),
	Elements(Position(1, 2), Smoother(X, Y(1), Y(2), Y(3), Legend(4)))
);

Report(gb)[LegendBox(1)] << Legend Position({3, [0, 1, 2], 4, [-1, -1, -1]});
lgnd_img1 = Report(gb)[LegendBox(1)] << get picture;

Report(gb)[LegendBox(1)] << Legend Position({3, [-1, -1, -1], 4, [0, 1, 2]});
lgnd_img2 = Report(gb)[LegendBox(1)] << get picture;

Report(gb)[FrameBox(1)] <<Add Image(image(lgnd_img1), Move(11.5, 650));
Report(gb)[FrameBox(2)] <<Add Image(image(lgnd_img2), Move(11.5, 150));

Report(gb)[LegendBox(1)] << Legend Position({3, [0, 1, 2], 4, [3, 4, 5]}); // // left here to check correct colors
-Jarmo
Prokaryote
Level II

Re: How do I create 2 or more legend boxes in Graph Builder and place each in the respective framebox/scalebox?

@jthi Thank you! That works for my needs, no worries if it's an image at this point!