Plotting Waterfall graph problem

Hi all

I got a set of ten data files. I'd like to fit them all into one 3D graph so they can be displayed on one slide.

For the 1st file, I have S1_x & S1_y as the normal x & y waves for a 2D graph.

I have ten, so I have ten separate y waves from S1_y to S10_y, and they all have the same x values in their corresponding x waves.

Here is what I used:

Concatenate {'S1_y','S2_y','S3_y','S4_y','S5_y','S6_y','S7_y','S8_y','S9_y','S10_y'}, wave_n

here n stands for the nth data, so n=1 means it's the 1st data, and the tick labels along this 3rd axis are to be replaced later.

Since they all have the same x values in their corresponding x waves, so they can all share the same S1_x wave.

Newwaterfall wave_n vs {S1_x,*}

But it returns an error message 'Expected a real-valued 2D matrix wave'.


I used the same method before but didn't encounter the same problem.

In addition, if they don't have the same x values in their corresponding x waves. What changes I'd need to make to display these 2D curves on one 3D graph?

Best Wishes

Your Sn_y waves should be 1D waves. Therefore your wave_n wave will be 2D which is what NewWaterfall requires.

You can check the dimensionality of your waves using Data->Browse Waves.

I tried these commands and it seems to work fine:
Make/N=5 wave0=p, wave1=1+p, wave2=2+p
Concatenate {wave0,wave1,wave2}, matrix
Edit matrix
NewWaterfall matrix
Make/N=5 xWave = 10*p
NewWaterfall matrix vs {xWave,*}


In your case Igor's built-in waterfall plot will probably work fine. If you had a different X wave for each Y wave, I would recommend a fake waterfall plot.
hrodstein wrote:
Your Sn_y waves should be 1D waves. Therefore your wave_n wave will be 2D which is what NewWaterfall requires.

You can check the dimensionality of your waves using Data->Browse Waves.

I tried these commands and it seems to work fine:
Make/N=5 wave0=p, wave1=1+p, wave2=2+p
Concatenate {wave0,wave1,wave2}, matrix
Edit matrix
NewWaterfall matrix
Make/N=5 xWave = 10*p
NewWaterfall matrix vs {xWave,*}


In your case Igor's built-in waterfall plot will probably work fine. If you had a different X wave for each Y wave, I would recommend a fake waterfall plot.


Thanks hrodstein

But I don't quite understand what the first command line means.

Make/N=5 wave0=p, wave1=1+p, wave2=2+p

How do you make Igor regconize xWave represents all the waves concatenated into the matrix by this command?

Make/N=5 xWave = 10*p
Quote:
But I don't quite understand what the first command line means.


If you don't understand that command then you need to do the Guided Tour of Igor to learn the basics. Choose Help->Getting Started.

Here are similar commands but with comments to explain what each command does. Execute these commands one line at a time. Execute them in a new experiment so you don't get "wave already exists" errors:

// Make 3 1D waves names wave0, wave1, wave2 with 5 points each
Make/N=5 wave0=p, wave1=1+p, wave2=2+p

// Display the waves in a table
Edit wave0, wave1, wave2

// Create a 2D wave named matrix by concatenating the 3 1D waves
Concatenate {wave0,wave1,wave2}, matrix

// Display the 2D wave in a table
Edit matrix

// Create a waterfall plot of the 2D wave
NewWaterfall matrix

// Create a 1D X wave to control the X axis of a different waterfall plot
Make/N=5 xWave = 10*p

// Create a waterfall plot using a 2D Y wave and a 1D X wave
NewWaterfall matrix vs {xWave,*}