turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Auto-stretching a Contour Plot

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

May 20, 2016 9:58 AM
(1517 views)

I'd like to create a Contour Plot which incorporates the functionality for fitting the chart to the size of the window containing it (i.e. if the user enlarges the window, the chart expands automatically to fill the available space). If it were a Graph Box, this could be done by setting the "<< auto stretching(1, 1)" property, but that doesn't seem to work with a Contour Plot. Can it be done? And if so, how?

Just as an aside, the Bubble Plot has an option called "Fit to Window" which seems to perform this same function, and I've tried simply applying this same syntax to the Contour Plot, but without success.

Many thanks.

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

May 20, 2016 10:39 AM
(2816 views)

Solution

I realise it doesn't have the full flexibility of the Contour Plot platform, but if you can live with Graph Builder then you get the desired behaviour for free:

dt = Open**(**"$SAMPLE_DATA/Little Pond.jmp"**)**;

cp = dt << **Graph Builder****(**

Size**(** **732**, **661** **)**,

Show Control Panel**(** **0** **)**,

Variables**(** X**(** :X **)**, Y**(** :Y **)**, Color**(** :Z **)** **)**,

Elements**(** Contour**(** X, Y, Legend**(** **5** **)**, Number of Levels**(** **10** **)** **)** **)**

**)**;

4 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

May 20, 2016 10:39 AM
(2817 views)

I realise it doesn't have the full flexibility of the Contour Plot platform, but if you can live with Graph Builder then you get the desired behaviour for free:

dt = Open**(**"$SAMPLE_DATA/Little Pond.jmp"**)**;

cp = dt << **Graph Builder****(**

Size**(** **732**, **661** **)**,

Show Control Panel**(** **0** **)**,

Variables**(** X**(** :X **)**, Y**(** :Y **)**, Color**(** :Z **)** **)**,

Elements**(** Contour**(** X, Y, Legend**(** **5** **)**, Number of Levels**(** **10** **)** **)** **)**

**)**;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

May 20, 2016 10:45 AM
(1408 views)

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

May 20, 2016 11:01 AM
(1408 views)

Adding to what **Ian** said, the Fit to Window option only works with Graph Builder, Bubble plot and Surface plot (fig. 1).

This is based on the JMP help and Scripting index.

A workaround I found for auto-stretching the Contour plot is by dragging the right border of the graph (fig. 2).

fig. 1

fig. 2

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

May 20, 2016 12:55 PM
(1408 views)

If for some reason Graph Builder contours do not suffice, Contour Plot can be made auto-stretching by sending a JSL message to the Frame Box:

dt=Open**(**"$SAMPLE_DATA/Little Pond.jmp"**)**;

contour = dt<<**Run Script****(**"Contour Plot"**)**;

report = **(**contour<<**Report****)**;

report**[**FrameBox**(****1)]** << **Set Auto Stretching(1**,**1)**;