This post will show you how to flatten a 3D waterfall plot to create a “spectrogram”, where the height of each spectrum will be flattened to be zero and represented by the color mapped to its height.
If you would like to work through these steps with me, you can download Flatten_Waterfall_Sample.zip file, extract the contents and open the OPJ file.
You should see a 3D Waterfall plot Graph1 with Y values as colormapping which is plotted from data in a workbook Book1:
From this graph, we can see that the curve height is Amplitude and the spectra are measured at different Temperature across a specified Wavelength range.
In the following sections, we will show you how to:
- Flatten waterfall plot
- Customize flattened waterfall
- Add and customize color scale
Flatten Waterfall Plot
To flatten a waterfall plot, we basically will rotate the waterfall plot to a top-view angle so that only perpendicularly projected straight line of every spectrum can be seen on XZ plane. To do it, follow the steps below:
- Double click on the graph to open Plot Details – Layer Properties dialog. With Layer1 node highlighted in the left panel, go to Planes tab. Uncheck XY, YZ checkboxes to only show ZX plane. Click Apply button to see the effect.
- Go to Axis tab, set Azimuth to be 90, Inclination to be 0 and Roll to be 180.
- Go to Miscellaneous tab. Select Orthographic from Projection drop-down list and uncheck Enable Shearing checkbox to disable shearing.
- Check Enable checkbox under Clipping group to clip data into layer frame. Click OK button.
Customize Flattened Waterfall
Now we want to further customize the graph to make the line thicker, set Maple palette as the color map, etc. To do so, follow the steps below:
- With Plot Details dialog open, expand Layer1 node and highlight the first data plot under it.
- Go to Pattern tab, set Width in Border group to be 4.
- Go to Colormap tab, click Fill… column heading to open Fill dialog. Check Load Palette radio box and click appeared Select Palette button to select Maple. Click OK button to exit.
- Click Level column heading to open Set Levels dialog, set # Major Levels to be 10 and # Minor Levels to be 5, and click OK button to exit.
- Click OK in Plot Details dialog to apply the settings and exit.
- Right click title Temperature and select Properties to open dialog, select 22 to be font Size to make it same size as X title.
Add and Customize Color Scale
To add a color scale, click button on Add Object to Graph toolbar and a vertically aligned color scale is added to the graph. We want to customize the color scale so that it is horizontally aligned with tick labels properly distributed and has a title Amplitude. To do so, just follow the steps below:
- Double click on the color scale to bring up Color Scale Control dialog.
- With Layout option highlighted on the left panel, select Horizontal radio box in Arrangement group to make the color scale align horizontally.
- Later we want the tick label to be further from color scale, we can set the offset in Label Offset from Bar Edge as 100 under Size and Label Offset (in % of font height) node.
- After that ,we can add a title by clicking Title option on the left panel and check Show checkbox. Enter Amplitude in Title edit box.
- If you want to hide the head and tail levels on the color scale, you can highlight Levels option on the left panel and check Hide Head and Tail Levels checkbox.
- Click OK to exit the dialog.
- Click the plot and move it lower in the graph. Click on the color scale once and drag one of the appeared blue handles to resize and position the color scale properly. Then we will have a flattened waterfall plot as shown on the top-most.