Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
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
Solved! Go to Solution.
@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.
So attach your worksheet with the data and clarify what you want to achieve.
Press help:
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.
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...
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 😉
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.