How do I create contour plots with no legend via scripting?<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />I just want to prevent the legends from being generated, & I didn't see a way to do this in any help pages. I am generating lots and lots of contour plots and the legends take up too much room.
Thanks!
Re: How do I create contour plots with no legend via scripting?If you want even less than the example given, instead of "removing the legend" you could just take and use the framebox with the plot.
I have a script like that which makes a big grid of mini contours. I don't want any of the axis stuff because I'm using a fixed scale for everything (actually I sometimes keep it on the left side and bottom of the grid but usually it's wafer maps with a very obvious scale so I don't want it at all) and I force the contour levels to match and keep one copy of the contour levels to go with all). Here's an example of the output of that...Not sure if this is really superceded by the latest capabilities of graph builder or not, may be.

anyway, the core of that idea would be just adding this to the example already given...
nw=newwindow("just the guts",
rep[framebox(1)]
);
Re: How do I create contour plots with no legend via scripting?You can create a similar plot in Graph Builder, where it's easier to remove the legend.
Using Car Physical Data as per above:
- Open GB and drag Displacement to X, Gas Tank Size to Y, Horsepower to Color.
- Click on the Contour toolbar icon.
- Click done
- Double-click on the legend
- Uncheck the checkbox
- Delete the Title
Here's what you get:

The code for this is:
Open("$SAMPLE_DATA/Car Physical Data.jmp");
Graph Builder(
Show Control Panel( 0 ),
Variables( X( :Displacement ), Y( :Gas Tank Size ), Color( :Horsepower ) ),
Elements( Contour( X, Y, Legend( 3 ), Number of Levels( 8 ) ) ),
SendToReport(
Dispatch( {}, "400", LegendBox, {Set Title( "" ), Position( {-1} )} )
)
);
Re: How do I create contour plots with no legend via scripting?Here is a contour plot example - sorry not a great data example but it illustrates how to do it:
Open("$SAMPLE_DATA/Car Physical Data.jmp");
cp = Contour Plot(
X( :Displacement, :Gas Tank Size ),
Y( :Horsepower ),
);

And with the legend removed:
Open("$SAMPLE_DATA/Car Physical Data.jmp");
cp = Contour Plot(
X( :Displacement, :Gas Tank Size ),
Y( :Horsepower ),
);
rep = cp << Report;
rep[DropBox(3)] << Delete;

-Dave