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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Translate the entire conversation x

Plot Issue

jw_CS
13-Aquamarine

Plot Issue

I'm relevely new to Mathcad. and today i run into a weird issue.

I have created a plot. and the first trace works as expected. The second one... the data is there but it isn't plot the way as i expected.

With symbols on i see the dots. but the line in between isn't plotted, and i don't have a clue why it isn't plotted at all.
I have tried to change the circle to also have 3 points what works perfect. The example here defines also data and works also. I tried changing data; plot types; etc, but nothing works.
I hope somebody here has an idea

ACCEPTED SOLUTION

Accepted Solutions
rgunwaldsen
15-Moonstone
(To:jw_CS)

Make x1 and y1 column vectors by transposing definition row vectors.

 

rgunwaldsen_0-1770222849642.png

 

View solution in original post

6 REPLIES 6
rgunwaldsen
15-Moonstone
(To:jw_CS)

Make x1 and y1 column vectors by transposing definition row vectors.

 

rgunwaldsen_0-1770222849642.png

 

Werner_E
25-Diamond I
(To:jw_CS)

The plot works as expected and you correctly had linked to an example for the so called "waterfall" plot.

Here a couple of vectors is plotted over other vectors.

In this example you can three separate traces because the matrix with the most columns has three columns (the y-matrix). Therefore the last column of the two-column x-matrix is also used for the third trace.

Each trace consists of just three points because the matrix with the least number of rows has just three rows. The fourth row of the y-matrix is not used at all. (And yes, one could certainly argue that it is somewhat inconsistent to use the maximum number of columns for the number of traces, but the minimum number of rows for the points to be plotted for each trace.)

The points of each trace are connected (depending on the line style selected in the plot menu), but the three traces are NOT CONNECTED to each other.

Werner_E_0-1770224950878.png

As is explained in the example you linked to, that's similar to creating three separate traces. The difference is that if you create three separate traces you could select color, line style. etc. for each trace separately, while in a waterfall plot all share the same settings.

Werner_E_1-1770225121828.png

 

 

In your example you provide two matrices with three columns but just one row.

That way you get three not connected traces but each of them consists of just one point (because there is only one row).

 

If you follow the advice of @rgunwaldsen  and transpose your matrices you get just one trace (because you provide just one column) which consists of three connected points (beacuse you provide three rows), which is what you seem to have expected.

As its just one simple trace we won't call it "Waterfall" plot, though 😉

 

rgunwaldsen
15-Moonstone
(To:Werner_E)

Werner - as usual, your explanation is cogent and correct. But I think the user was simply asking how to make his 3 points of data display like his circular data; i.e. X versus Y where X and Y are vectors. A waterfall plot would typically be used for 3 dimensions of data; for example a sonar display showing time histories of bearing versus frequency data.

Werner_E
25-Diamond I
(To:rgunwaldsen)

I only commented on the waterfall plot because @jw_CS  had mentioned and provided a link to an example page where the usage of waterfall plots is shown and he was confused why it works in that example and not for his approach as he wrote "The example here defines also data and works also". That's the reason I explained what waterfall plots actually are meant for and how they work.

And so I also tried to explain that he, because he was defining row vectors instead of column vectors, mistakenly and certainly unintentionally created a waterfall plot where each trace would consist of one point only.

I agree that he sure simply intended to create the plot you had shown

 

jw_CS
13-Aquamarine
(To:Werner_E)

I give a little bit of clarification.

I have more or less a python (numpy; scipy; matplotlib (mpl)) background.  As long as it is a 1D array mpl don't care about direction. they are basically the same. So i'm / i was a bit surprised that  for Mathcad it makes a big difference.

The link to waterfall was more or less that i didn't see an how to for the normal line plot. I was looking for the info that @rgunwaldsen give but also thanks @Werner_E for the explanation (specially about the ignoring the last index(es), what is at least as weird as the required directionality)

Werner_E
25-Diamond I
(To:jw_CS)

I figured there was some confusion between column and row vectors, and that the waterfall plot generated by using the row vector wasn't what was intended.

And yes, the help section for Prime is not particularly well structured or organized. It is difficult to find help for specific questions, and the (urgently needed) examples are far too few and far between, poorly located, and not particularly well chosen.

Most of the information is often available, but not always easy to find and clearly understandable. This also applies to the reference to column vectors here.

Werner_E_0-1770317310040.png

It would certainly make sense for PTC to completely revamp the help system, but this time by a team that really knows the program and how it is typically used. But I can hardly imagine that happening in the short or medium term.

Announcements

Top Tags