cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Prokaryote
Level III

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 III

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 III

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!

Recommended Articles