Choose Language Hide Translation Bar
Highlighted
ALopez
Level I

Overriding Legend Position defaults

In Graph Builder, is there a way to override the "legend Position" defaults": Inside Left or Inside Right? I tried - Legend Position("Inside Center") but it did not work.

Graph Builder(
Size( 534, 462 ),
Show Control Panel( 0 ),
Legend Position( "Inside Left" ),
Variables( X( :EFT ), Y( :CA, Side( "Right" ) ), Y( :DX, Position( 1 ) ) ), - - - etc.

Thanks.

 

 

5 REPLIES 5
Highlighted
txnelson
Super User

Re: Overriding Legend Position defaults

I can assume that the issue falls outside of the code you provided.  Here is a simple example, which when run against the Sample Data table called Big Class works fine in JMP 15

Graph Builder(
	Size( 528, 456 ),
	Show Control Panel( 0 ),
	Legend Position( "Inside Left" ),
	Variables( X( :weight ), Y( :height ), Overlay( :sex ) ),
	Elements( Points( X, Y, Legend( 12 ) ), Smoother( X, Y, Legend( 13 ) ) ),
	SendToReport( Dispatch( {}, "400", LegendBox, {Set Title( "" )} ) )
);

See if it works for you, and then check your complete code for possible issues

Jim
Highlighted
ALopez
Level I

Re: Overriding Legend Position defaults

Hi TX,

No, the problem (at least the one that I have) is right there on line 4 of my original code snippet: 

Legend Position( "Inside Left" ),

That is the setting that I want to override.  I don't want Left or Right I would like to be able to fine tune the "Horizontal" position of the "Legend" or at least do a " Legend Position ("Inside Center").  In the code that you posted the Legend is still on the left (see pic). Sorry if I was not clear about what I trying to do.

Cheers!

LegendPosition.PNG

Highlighted
txnelson
Super User

Re: Overriding Legend Position defaults

The documentation in the Scripting Index indicate that only 4 options are available

legend.PNG

Jim
Highlighted
ALopez
Level I

Re: Overriding Legend Position defaults

Bummer, I was hoping to get around those options through some JSL magic.  Anyways, thank you very much for taking the time to answer my question.  Stay safe.

Highlighted
txnelson
Super User

Re: Overriding Legend Position defaults

You can always add your own graphics to any of the JMP graphs and charts, using JSL. But that would not be the repositioning of the legend, but rather creating your own graphical display on top of the Graph Builder output. This capability is documented in the Scripting Guide in a section called "Add Scripts to Graphs"
Jim
Article Labels