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

- JMP User Community
- :
- Discussions
- :
- Compute Areas Inside Contours

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

Highlighted
##

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

Compute Areas Inside Contours

Aug 28, 2020 7:04 AM
(354 views)

Is there an embedded function within JMP or does someone know an easy way for JMP to output the area of a given contour or all the contours in a contour plot? I can find code in python or matlab i could adapt but wondered if there was something easy already available in the community.

I'm interested in knowing the total area of each color in the plot.

7 REPLIES 7

Highlighted
##

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

Re: Compute Areas Inside Contours

Would counting pixels be accurate enough?

Craige

Highlighted
##

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

Re: Compute Areas Inside Contours

If I understand why counting pixels means, I think it would.

Highlighted
##

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

Re: Compute Areas Inside Contours

I don't know how to count pixels, however. Is that function available in JMP?

Highlighted
##

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

Re: Compute Areas Inside Contours

Created:
Aug 28, 2020 4:44 PM
| Last Modified: Aug 28, 2020 4:46 PM
(310 views)
| Posted in reply to message from datanaut 08-28-2020

Which version of JMP are you using? I created a script to do what you want, counting pixels, using JMP 11. It works through JMP 13. I think it broke in JMP 14.x where x>1. The earlier versions of JMP Save Script exposed the contour labels and colors (the 3rd argument in each contour expression below), so it was easy to parse and count matching pixels.

```
Specify Contours(
Min( 2 ),
Max( 8 ),
N( 7 ),
Contour( 1, 2, -5793511 ),
Contour( 2, 3, -8423637 ),
Contour( 3, 4, -10725064 ),
Contour( 4, 5, -12632256 ),
Contour( 5, 6, -12885662 ),
Contour( 6, 7, -13595764 ),
Contour( 7, 8, -14828355 ),
Contour( 8, 8, -16517899 )
),
```

After JMP 14.x Save Script did not expose the contour colors, only

```
Specify Contours( Min( 2 ), Max( 8 ), N( 7 ) ),
```

So the script needs to be converted to get the colors from the Legend (get journal).

Let me know which version of JMP you are using. Look for a later post that should work for all versions.

Highlighted
##

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

Re: Compute Areas Inside Contours

Thanks for this helpful reply.

I'm on JMP 14.3 on a Mac.

Sounds like it will be just what I need.

Highlighted
##

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

Re: Compute Areas Inside Contours

Experiments here: Contour Plot Areas

@gzmorgan0 -- feel free to take anything useful! It looks like you have an actual interface in mind.

Craige

Highlighted
##

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

Re: Compute Areas Inside Contours

Thanks to you both for efforts. I may try to adapt what @Craige_Hales has done or if @gzmorgan0 has a version that works with JMP14+.