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

Community email notifications are disrupted. While we are working to resolve, please check on your favorite boards regularly to keep up with your conversations and new topics.

Axis labels in 3-D and contour plots

dfehr
1-Newbie

Axis labels in 3-D and contour plots

I am using Mathcad 14 m020. I am relatively new to using 3-D and contour plots in Mathcad. I am currently plotting FFT spectrum data of a time history data set in which I am slicing the total time history into smaller time windows (i.e. a waterfall plot). The calculated FFT spectra of the time history data is stored in a matrix in which the rows of the matrix correspond to the frequency (Y axis), the columns of the matrix data correspond to the time window slices (X axis) and the magnitude of the FFT is the Z axis (or color of the contour plot). Is there a way of changing the display for the X axis scale on the plot such that it shows the corresponding time of the time window instead of the matrix column number? Likewise, display on the Y axis the corresponding frequency instead of the matrix row number? I do not see any simple way of doing this. Am I missing something obvious?

Thank You
DJF
14 REPLIES 14
RichardJ
19-Tanzanite
(To:dfehr)

Create 3 matrices of the same size, with the X, Y, and Z coordinates. In the graph placeholder type (X,Y,Z).

Richard

"Save as" version 11 for a larger audience.
More collab might be willing to doctor the idea.
Many Mathcaders have ready made tools.

jmG
PhilipOakley
5-Regular Member
(To:dfehr)

On 3/26/2009 9:46:03 AM, djfehr wrote:
Is there a way of
>changing the display for the X
>axis scale on the plot such
>that it shows the
>corresponding time of the time
>window instead of the matrix
>column number? Likewise,
>display on the Y axis the
>corresponding frequency
>instead of the matrix row
>number? I do not see any
>simple way of doing this. Am
>I missing something obvious?
>
>Thank You
>DJF

I don't think so. You are plotting a matrix surface plot, right?

However, you can change the style of 3d plot so that it is a scatter plot i.e. triples (X, Y, Z).
This does scale the axes, but you have to visualise the surface yourself (e.g. try making the dots large enough, and making them rainbow coloured based on Z value)

Philip Oakley

You can plot (X,Y,Z) as a surface if you wish. It doesn't have to be a scatter plot.

Richard

Yes, I am trying to plot either a color contour plot or a color surface plot with matrix input data.

Thanks for your response

DJF

On 3/26/2009 12:26:28 PM, djfehr wrote:
>Yes, I am trying to plot
>either a color contour plot or
>a color surface plot with
>matrix input data.
>
>Thanks for your response
>
>DJF
____________________________

Then get the blank surface plot from the menu,
in the place holder type M (if M is your matrix name),
make it contour as you wish. Can't help more w/o the matrix.

jmG

On 3/26/2009 9:46:03 AM, djfehr wrote:
>...
Is there a way of
>changing the display for the X
>axis scale on the plot such
>that it shows the
>corresponding time of the time
>window instead of the matrix
>column number? Likewise,
>display on the Y axis the
>corresponding frequency
>instead of the matrix row
>number? I do not see any
>simple way of doing this. Am
>I missing something obvious?
>
>Thank You
>DJF
_________________________

Don't know in 14, but in 11 and lower answer is NO immediately. But it could, by splining the matrix and plot a Createmesh. I'm not going to make a typical. "Save as" 11 or lower, it might interest more collabs from an eventual returned tool.

jmG

>You can plot (X,Y,Z) as a surface if you wish. It doesn't have to be a scatter plot.

>Richard


Richard's suggestion works. I think the main disadvantage is that it takes more memory because you have three matrix defined instead of one. For small data sets this is probably not an issue, but for large data sets it could be problematic. It seems pretty inefficient to have to fill two additional matrix in order to get the X & Y axis scaling correct, but at least the X & Y scales have meaningful values.

Perhaps there is a more efficient method. I am open to additional ideas.

Thanks for your responses.
DJF

On 3/26/2009 1:24:25 PM, djfehr wrote:
>>You can plot (X,Y,Z) as a surface if you wish. It doesn't have to be a scatter plot.
>
>>Richard
>
>
>Richard's suggestion works...
>Thanks for your responses.
>DJF
____________________________

What about my converter ?

Always nice to know about help accepted/rejected.
Often, projects succeed by steps in collaboration.
Are you still looking for waterfall plot ?

jmG



Some "waterfall" plot attached.
There is also the sheet from Lou.

jmG

On 3/26/2009 1:50:16 PM, jmG wrote:
>On 3/26/2009 1:24:25 PM, djfehr wrote:
>>>You can plot (X,Y,Z) as a surface if you wish. It doesn't have to be a scatter plot.
>>
>>>Richard
>>
>>
>>Richard's suggestion works...
>>Thanks for your responses.
>>DJF
>____________________________
>
>What about my converter ?
>
>Always nice to know about help
>accepted/rejected.
>Often, projects succeed by steps in
>collaboration.
>Are you still looking for waterfall plot?
>
>jmG
>
>
>

I haven't had a chance to try your converter document with my data yet, but it appears to me it should work (it looks like a nicer way to create the X & Y matrix than my quick & dirty method I used to evaluate Richard's suggestion).

I started this time history data FFT waterfall/contour plot exercise using a Mathcad Quick sheet showing a method to create 3-D waterfall plots, but the quick sheet did not attempt to scale the X & Y axis to Time & Frequency. I didn't see a way to do it. I figured (correctly) the User Forum/Collaboratory would have a solution.

Thanks again for everyone's assistance.
DJF
RichardJ
19-Tanzanite
(To:dfehr)

On 3/26/2009 1:24:25 PM, djfehr wrote:
> It seems pretty
>inefficient to have to fill
>two additional matrix in order
>to get the X & Y axis scaling
>correct,

Yes. An exceedingly large hammer for a very small nail. Unfortunately, Mathcad doesn't provide a smaller hammer.

Richard


You might want to do a search on waterfall plots. There have been a number of sheets showing different ways of drawing them.
__________________
� � � � Tom Gutman

On 3/26/2009 9:46:03 AM, djfehr wrote:
>...
>Am I missing something obvious?
>
>Thank You
>DJF
_______________________________

That might do as well ?
You "custom grid" instead of matrix grid.

jmG



Top Tags