Flatten Waterfall Plot

posted in: Graphing | 0

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.

Flatten_Waterfall_05

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:

Flatten_Waterfall_01

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:

  1. 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.
  2. Go to Axis tab, set Azimuth to be 90, Inclination to be and Roll to be 180.
  3. Go to Miscellaneous tab. Select Orthographic from Projection drop-down list and uncheck Enable Shearing checkbox to disable shearing.
  4. Check Enable checkbox under Clipping group to clip data into layer frame. Click OK button.

Flatten_Waterfall_02

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:

  1. With Plot Details dialog open, expand Layer1 node and highlight the first data plot under it.
  2. Go to Pattern tab, set Width in Border group to be 4
  3. 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 MapleClick OK button to exit.
  4. 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.
  5. Click OK in Plot Details dialog to apply the settings and exit.
  6. Right click title Temperature and select Properties to open dialog, select 22 to be font Size to make it same size as X title.

Flatten_Waterfall_03

 

 

Add and Customize Color Scale

To add a color scale, click Flatten_Waterfall_04 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:

  1. Double click on the color scale to bring up Color Scale Control dialog.
  2. With Layout option highlighted on the left panel, select Horizontal radio box in Arrangement group to make the color scale align horizontally.
  3. 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.
  4. 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.
  5. 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.
  6. Click OK to exit the dialog.
  7. 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.

Leave a Reply