Colormapped Line Series

posted in: Graphing | 0

User asked how to map color of each spectrum to a different color in a colormap based on Column label row values and show the color scale on the graph as follows.

line_color_scale_1

Though Origin’s line plot can easily assign a different color to each spectrum, it couldn’t show the color scale on the graph. This post will show you a workaround to accomplish this. Plot colormapped waterfall plot first. Then flatten it to show 2D effect.

To follow along with this blog in Origin, the OPJ for it can be downloaded here.

Comments row of the worksheet shows differernt values from 275 to 365. Highlight all columns and select menu Plot:Y-offset/Waterfall: Waterfall Z:Colormapping. A waterfall is created with color of each spectrum mapped on a color scale from 275 to 365.

2652_02

Double click on the graph to open Plot Details dialog. Select Layer1 on left panel. On Display tab, uncheck Show Elements: Z Axes. Click Apply button.

2652_03

On Waterfall tab, check Show Hidden Lines and set both X offset and Y offset to 0. Click Apply button.

2652_04

 

Select first plot under Layer1 on left panel. On Colormap tab, click Level… to change level increment to be from 275 to 375. Increment 10 so each plot will have a different color. Click OK to close the dialog.

Double Click any axis to open Axis dialog.

Select Title & Format tab. Choose Right icon. Uncheck Show Axis & Ticks. Do the same for Top Axis.

Select Left icon. Check Show Axis & Ticks and choose Out for both Major and Minor Ticks.

2652_05

On Tick Labels tab, check Show Major Labels for Left and uncheck it for Right. Click OK to apply the settings.

2652_06

Delete the redundant Z axis title.

Click Add Color Scalecolorscalebutton on Add Object to Graph toolbar. Double click it and open Color scale Control dialog.

On Layout node, set Labe Side Offset from Center as 100 so each label shows in the middle of the color segment.

 

On Levels node, check Hide Head and Tail Levels. Choose Custom Levels in Show on dropdown list. Set From as 275 and to as 365. Under Major Tick branch, Type is By Increment, set Value as 10. so that only colors and label from 275 to 365 shows in color scale.

On Line and Ticks -> Right node, set Major Ticks Style as None.

Click OK to close the dialog.

Resize layer and color scale. You will get the graph at the beginning of the blog. See Graph3 in Sample Graphs folder of the opj file.

 

This blog uses 2D waterfall as an example. You can also plot as 3D waterfall plot first and then flatten it. See  Graph2 in Sample Graphs folder.

Leave a Reply