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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

No data found for 3d plot

SP_9781969
7-Bedrock

No data found for 3d plot

No matter what range i change i am not able to show 3d plot data. Anyways how's the range should be chosen for such scenarios 

ACCEPTED SOLUTION

Accepted Solutions
LucMeekes
23-Emerald III
(To:SP_9781969)

"Is there any specific reason"

 

Yes, Prime will not accept a 3D plot from a matrix with just a single row. It's because it (deliberately or inadvertently) was implemented that way:

LucMeekes_0-1655033114738.png

The work-around (one of the many work-arounds that you need when working with Prime) for this shortcoming is to repeat the matrix row when you want to plot just a single point. This can be done by stacking:

LucMeekes_1-1655033242789.png

Success!
Luc

View solution in original post

10 REPLIES 10

Hi,

It would appear you need at least two rows in the data to get a scatter plot!

Capture.JPG

Cheers

Terry

Werner_E
25-Diamond I
(To:SP_9781969)

In real Mathcad plotting a couple of points was a bit awkward as it needed a nested matrix to do so. This was made a bit easier in Prime.

But Mathcad would also allow to plot a single point and this seems to be broken in Prime. On the other hand, the plot abilities in Prime, and especially the 3D plots, are not really to be taken seriously anyway.

A simple workaround, if you really want to use Primes 3D plot and plot a single point, is to plot the same point twice 😉

Werner_E_0-1654899330749.png

 

Is there any specific reason the same point needs to be plotted twice?

LucMeekes
23-Emerald III
(To:SP_9781969)

"Is there any specific reason"

 

Yes, Prime will not accept a 3D plot from a matrix with just a single row. It's because it (deliberately or inadvertently) was implemented that way:

LucMeekes_0-1655033114738.png

The work-around (one of the many work-arounds that you need when working with Prime) for this shortcoming is to repeat the matrix row when you want to plot just a single point. This can be done by stacking:

LucMeekes_1-1655033242789.png

Success!
Luc

How do I to plot the points so that each row from each matrix “A, B, and C” be considered as “x, y, and z” coordinates of the points, respectively.

Example: P1(x1=3 y1=60 z1=30) ; P2(x2=10 y2=40 z2=30) ; … ; P21(x21=35 y21=80 z21=30)

Werner_E
25-Diamond I
(To:SP_9781969)

To create the necessary n x 3 matrix you have to use "augment", not "stack".

Werner_E_0-1655753210306.png

 

Is it possible to pass a surface through these points (using the mesh or any other functions available in MathCAD, let me know how if it is possible

Werner_E
25-Diamond I
(To:SP_9781969)

basically you have two options, either an interpolating surface which includes all points but of course would be defined piecewise, or a fitted surface which may not include exactly a single of the given points but will fit best.

For the first option you may find functions for a 2D interpolation which uses either linear or cubic spline interpolation here in the froum.

For the second option you may use "polyfit" for a polynomial fit or a solve block with "minerr" to fit your data to an arbitrary function type.

 

Using "polyfit" to fit a third order polynomial may look like this

Werner_E_0-1655762478080.png

 

Werner_E
25-Diamond I
(To:SP_9781969)


@SP_9781969 wrote:

Is there any specific reason the same point needs to be plotted twice?


Yes, the reason is that it doesn't work in Prime if you don't 😄

 

We don't know why PTC implemented it that way. But then, we also don't know why a company with a full fledged CAD and 3D modeling program as one of their flag ships is not willing to implement 2D and 3D plotting capabilities in Prime which at least come up to the level of age old Mathcad (and Mathcad sure never was famous for its plotting abilities). They implemented in a very clumsy way a third party 2D plot tool which lacks a lot (like being unit aware) and the 3D plot in Prime sure is something better not used at all - the formatting abilities are nearly non-existent, at least very poor.

 

As of plotting just one single point in Primes 3D, my guess is that Prime always tries to connect the points, even when you have selected a symbol and no line (the default setting is Symbol:none and a full line). So it must run into troubles if you provide just one single point in case the programmers have not considered this case.

ttokoro
20-Turquoise
(To:SP_9781969)

image.pngimage.pngimage.pngimage.pngimage.png

Announcements

Top Tags