Plotting Waterfall graph problem
Igor_user
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
You can check the dimensionality of your waves using Data->Browse Waves.
I tried these commands and it seems to work fine:
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.
March 14, 2012 at 09:36 pm - Permalink
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
March 14, 2012 at 09:45 pm - Permalink
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/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,*}
March 14, 2012 at 10:26 pm - Permalink