Get Help

Turn on suggestions

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

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- How to create a 3d surface/contour plot in prime 2...

Options

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

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

Showing results for

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-25-2013
04:54 AM

04-25-2013
04:54 AM

Hello All,

I have 3 vector for X, Y, Z but I am unable to create a 3d surface plot or contour plot of this in mathcad prime 2.0

I have read somewhere that is is not possible anymore but maybe there is a way to do it.

many thanks for the help.

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-25-2013
07:44 AM

04-25-2013
07:44 AM

11 REPLIES 11

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-25-2013
07:44 AM

04-25-2013
07:44 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-25-2013
09:08 AM

04-25-2013
09:08 AM

Re: How to create a 3d surface/contour plot in prime 2.0

many thanks for your reply, it works great.

I have altered the sheet a little te include my real data and use a contour plot i.s.o 3d surface.

Somehow the colormap is wrong, do you know how to fix that too?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-25-2013
10:23 AM

04-25-2013
10:23 AM

Re: How to create a 3d surface/contour plot in prime 2.0

You data ranges from -300 to -40, so you should change the colormap accordingly

See attached

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-25-2013
10:28 AM

04-25-2013
10:28 AM

Re: How to create a 3d surface/contour plot in prime 2.0

thanks for the help, but in you file the colormap is also wrong.

I have values in the z matrix that are higher than let say -50 and they should be orange according to the colormap. But they are not.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-25-2013
10:42 AM

04-25-2013
10:42 AM

Re: How to create a 3d surface/contour plot in prime 2.0

I see what you mean, but this are only about 6 values on the outer right edge. Obviously not making a plane region for Mathcad to shade.

Maybe you get a better looking plot using a spline interpolation of your surface.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-25-2013
03:07 PM

04-25-2013
03:07 PM

Re: How to create a 3d surface/contour plot in prime 2.0

After playing around with the sheet a while I agree, that the behaviour of the colormapping is at least not reasonable to me, too. I wouldn't call it a bug yet as maybe its just because of the coarse grid - we only have a 4*25 data table.

Find attached a version which uses a spline interpolated function from your data table - think it looks better.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-25-2013
03:47 PM

04-25-2013
03:47 PM

Re: How to create a 3d surface/contour plot in prime 2.0

many thanks for the interpolation hint.

haha we where working on it at the same time.

I see you also came up with a solution.

I added a function which uses Bicubic2D to create the new interpolated surface and it seems to work.

or is it not meant to be used for this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-25-2013
05:52 PM

04-25-2013
05:52 PM

Re: How to create a 3d surface/contour plot in prime 2.0

Bicubic2D seems to be exactly meant for this. From the description it looks like it does pretty much the same as my routine, but with a prebuilt command. You may like to compare two plots done with my routine and bicubic2D - I haven't done it but I guess there would be no difference.

Bicubic2D is new in Prime and I was not aware of its existence - I'm a Mathcad 15 user and I plan to stay with that version as long as possible, as Prime is not really a full fledged alternative at the time being. But sometimes one is able to discover an advantage.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-26-2013
01:50 AM

04-26-2013
01:50 AM

Re: How to create a 3d surface/contour plot in prime 2.0

Bicubic2D does seem to do the same but with a linear interpolation.

I checked it by changing you routine from cspline into lspline and the results where identical.

Many thanks again for the help

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-26-2013
04:12 AM

04-26-2013
04:12 AM

Re: How to create a 3d surface/contour plot in prime 2.0

Arjen Walstra wrote:

Bicubic2D does seem to do the same but with a linear interpolation.

I checked it by changing you routine from cspline into lspline and the results where identical.

Many thanks again for the help

Good to know, but why is that method called biCUBIC then?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-26-2013
05:17 AM

04-26-2013
05:17 AM

Re: How to create a 3d surface/contour plot in prime 2.0

I don't know why they call it Bi**Cubic**2D.

this is what they say in the help file:

"The Bicubic2D function is equivalent to using lspline in two dimensions, with no restrictions on the number of rows and columns of the input values. To obtain a value for a new point, Bicubic2D interpolates down each column of the Z matrix, creating a new row. It then interpolates across the new row. "