cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Plotting Data in Contour Plot

RK_10340358
2-Guest

Plotting Data in Contour Plot

I have a list of x, y, z coordinates that I'm trying to plot within a contour plot, but the resulting plots aren't returning reasonable scales...

 

Was wondering if anyone has ever done anything like this and if they could share the format they used to plot said data?

 

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions


@RK_10340358 wrote:

I have a list of x, y, z coordinates that I'm trying to plot within a contour plot, but the resulting plots aren't returning reasonable scales...

 

Was wondering if anyone has ever done anything like this and if they could share the format they used to plot said data?

 

Thanks in advance


I am not sure how we should understand your question:

 

1) You have a surface and already succeeded to make a contour plot of it. Now you want to add a 3D plot to highlight a couple of points. This is easy to do with real Mathcad, but using Prime you are out of luck if you want to plot anything else within a contour plot.

 

OR

 

2) You have a list of (a lot) of x,y,z point coordinates and want it to be interpreted as a surface to make a contour plot of it. That should be possible to do  but you have to somehow tell Prime that your data resembles a surface.
The example in the help Luc pointed you to, where a contour plot of a matrix is created, is missing the x- and y-coordinates as all data is interpreted as z-values.
This seems to be handled differently if the matrix is a n x 3 matrix with x-, y- and z-coordinates in the the three columns. Here Prime interprets the data exactly as you want and should provide the contour plot you are looking for. An example is shown in the attached P6 file.

Werner_E_0-1655120295625.png

 

 

So attach your worksheet with the data and clarify what you want to achieve.

View solution in original post

5 REPLIES 5
LucMeekes
23-Emerald III
(To:RK_10340358)

Press help:

LucMeekes_0-1655100210109.png

Then type  contour in the search box, and select Example: Contour Plots or Level Curves from the list.

And/or:

Attach your worksheet and explain what you expected <=> saw.

 

Success!
Luc


@RK_10340358 wrote:

I have a list of x, y, z coordinates that I'm trying to plot within a contour plot, but the resulting plots aren't returning reasonable scales...

 

Was wondering if anyone has ever done anything like this and if they could share the format they used to plot said data?

 

Thanks in advance


I am not sure how we should understand your question:

 

1) You have a surface and already succeeded to make a contour plot of it. Now you want to add a 3D plot to highlight a couple of points. This is easy to do with real Mathcad, but using Prime you are out of luck if you want to plot anything else within a contour plot.

 

OR

 

2) You have a list of (a lot) of x,y,z point coordinates and want it to be interpreted as a surface to make a contour plot of it. That should be possible to do  but you have to somehow tell Prime that your data resembles a surface.
The example in the help Luc pointed you to, where a contour plot of a matrix is created, is missing the x- and y-coordinates as all data is interpreted as z-values.
This seems to be handled differently if the matrix is a n x 3 matrix with x-, y- and z-coordinates in the the three columns. Here Prime interprets the data exactly as you want and should provide the contour plot you are looking for. An example is shown in the attached P6 file.

Werner_E_0-1655120295625.png

 

 

So attach your worksheet with the data and clarify what you want to achieve.

Thank you, I realize I was using a nested array and that was the issue.

 

Follow up question, how do I increase the number of contour lines?

 

I have ULTM, LLTM, and ITM defined above my plot (as per what I read here)

 

But it isn't updating my plot... 

 

RK_10340358_0-1655129238249.png

 

The help isn't really clever and helpful in this point.

What they mean is that you MANUALLY type in those values yourself in the plot.

Like with the axis values in a 2D plot you can change the first, second and last value in the legend, too.

LLTM is not a system variable, its just used in the help to specify a value for the first entry in the legend (Lower Limit Tick Mark). The same applies to the other two variables. You are supposed to manually edit the legend.

Fortunately you can also use variables here. In the pic below I used the variables and now changing their values has effect 😉

Werner_E_1-1655141303551.png

 

When the focus is off the plot region, you will see the values displayed and not the variable names.

Of course you must not use any variables, you may also just type in the desired values or, to increase the number of contour lines, all thats needed usually is to type a value in the place holder for the second value ("ITM") which is closer to the first and you can leave the other two autodetected.

 

ttokoro
20-Turquoise
(To:RK_10340358)

image.pngimage.pngimage.pngimage.png

Top Tags