Subscribe Bookmark RSS Feed

How to move the legend part to the bottom

judith

Community Trekker

Joined:

Jan 19, 2012

When using graph builder, how to move the legend part to the bottom of the graph instead of current right side? Is there any part of JSL that could do the changes? Thanks a lot.

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

I can't find a way to do it by hand, but it's possible with JSL.

Here is one way exanple on how it can be done:

Open( "$ENGLISH_SAMPLE_DATA/Big Class.jmp" );

gb = Graph Builder(

          Show Control Panel( 0 ),

          Variables( X( :age ), Y( :weight ), Y( :height ) ),

          Elements( Position( 1, 1 ), Points( X, Y, ), Smoother( X, Y, ) ),

          Elements( Position( 1, 2 ), Points( X, Y, ), Smoother( X, Y, ) )

);

gbr = Report( gb );

legend = gbr[LegendBox( 1 )];

legend << orientation( "horizontal" );

gbr[Outline Box( 1 )] << append( legend );

legend << delete;

5 REPLIES
Solution

I can't find a way to do it by hand, but it's possible with JSL.

Here is one way exanple on how it can be done:

Open( "$ENGLISH_SAMPLE_DATA/Big Class.jmp" );

gb = Graph Builder(

          Show Control Panel( 0 ),

          Variables( X( :age ), Y( :weight ), Y( :height ) ),

          Elements( Position( 1, 1 ), Points( X, Y, ), Smoother( X, Y, ) ),

          Elements( Position( 1, 2 ), Points( X, Y, ), Smoother( X, Y, ) )

);

gbr = Report( gb );

legend = gbr[LegendBox( 1 )];

legend << orientation( "horizontal" );

gbr[Outline Box( 1 )] << append( legend );

legend << delete;

judith

Community Trekker

Joined:

Jan 19, 2012

It works like a magic. Thanks a lot for your help.

judith

Community Trekker

Joined:

Jan 19, 2012

Hi, one more problem I got now is I can't copy the whole graph to other place. I tried to ctrl-c and ctrl-v and it only allowed me to copy the graph itself, not with legend together. Do you know to how to copy the whole thing in a quick way? Thanks again.

ms

Super User

Joined:

Jun 23, 2011

Activate the selection tool (a fat plus sign) and select the parts of the report you wish to copy. Sometimes it is easier to select parts if the report is journaled (ctrl-j) firtst. Once properly selected I think ctrl-c would work as expected.

judith

Community Trekker

Joined:

Jan 19, 2012

There is no plus sign for me to select (grayed out) for graph builder. Anyway, I figured out a way of auto-save the graph into a .jpg file. Thanks for your hint.