The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Combining 3D waterfall Plot with 2D Line Plot
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

pavi-chem

United Kingdom
26 Posts

Posted - 08/23/2024 :  12:57:04 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin):
OriginPro 2022b (64-bit) SR1
9.9.5.171 (Academic)
Operating System: Windows 11

Hello Everyone,



I'm working on a project where I need to combine a 3D waterfall plot with a 2D line plot in a single graph, similar to the image attached above. Specifically, I'm plotting a series of IR spectra (absorbance vs. wavenumber vs. time) as a 3D surface plot, and I want to overlay the potential oscillations as a 2D line plot on top of it.

Steps I've Taken:
  • I created the 3D surface plot using my IR spectra data.
  • I also generated the 2D line plot showing potential oscillations over time.

How can I combine these two plots so that the 2D line plot is overlaid correctly on the 3D waterfall plot's y-axis?
Specifically, how can I align the time axis of the 2D plot with the time axis of the 3D plot?





Thanks a bunch!
Pavi.

NicholasSupport

USA
38 Posts

Posted - 08/23/2024 :  5:14:20 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello Pavithra,

Thank you for reaching out. This is a little tricky because you must have your data set up in a specific way to allow the unidirectional wire grid lines, i.e. to allow X and Y grid lines to be independent.

To achieve this, set your data up so that col(A) contains one variable and row(1) contains the other (like a matrix or a map would be set up). Your worksheet should look something like this:
[ ] X X X X X X X X X X X X
Y - - - - - - - - - - - -
Y - - - - - - - - - - - -
Y - - - - - - - - - - - -
Y - - - - - - - - - - - -
Y - - - - - - - - - - - -
Y - - - - - - - - - - - -
Y - - - - - - - - - - - -
Y - - - - - - - - - - - -
Y - - - - - - - - - - - -

Next, select the entire worksheet and go to the Plot menu > 3D > 3D Wire Frame. In the setup dialog, make sure to select the proper location of each variable, which should be the first row/column respectively.

Go ahead and click OK. (If you need to, you can always click the green lock icon in the upper-left corner of your graph, select "Change Parameters...", and make any changes to the setup dialog.)

Now, open the properties of your new plot by double clicking on the wire frame. Navigate to the plot's "Mesh" tab and change <Grid Lines> to 'X [or Y] Grid Lines Only', and feel free to play around with the Line Width and the Total Number of Major [Mesh Lines] options, which are also found on the 'Mesh' tab.

Depending on your scale and units, you may find that the variables' horizontal or vertical placement makes a difference in the appearance of your graph. If you need to swap X and Y, go back to your worksheet then to the Restructure menu > Transpose and make sure that "Exchange Label With Data" is unchecked, then click OK. Make a new 3D Wire Frame to see your results.

Next, we need to return once more to your original worksheet and go to the Worksheet menu > Convert to XYZ. Set <Convert Range> to 'Entire Worksheet' and <Data Format> to 'X [or Y] across columns' and 'First Data Row/Column' from both of the drop-down menus. Click OK to open a new coordinate-based worksheet.

From here, go back to your graph and select the Insert menu > Plot to Layer > 3D Scatter. Highlight all three columns of the XYZ worksheet, click OK, and see if your graph looks appropriate. If it is horribly askew, then return to the XYZ worksheet, click the green lock icon > Change Parameters, and select the other variable to be 'across columns'. This should line up your two plots.

Finally, active your graph window and look at the Object Manager in the upper-right corner of the screen. Check the lower two projections, ZX and YZ, and uncheck the "Original" plt. Double-click on either ZX or Y Projection to open Plot Properties, then check "Connect Symbols" in the [Line] tab.

Let me know if you would like to make any further changes to the graph. I see it is not exact, but I imagine we could achieve a closer fit if we incorporate the Peak Analyzer to identify all peaks in both worksheets.

Here is my project file: https://my.originlab.com/ftp/forum_and_kbase/Images/F48440%20[Pavithra%20-%20pavi-chem]%203D%20Wire%20Frame%20with%20Projections.zip

Happy Graphing!

Nicholas G.
nicholas@originlab.com
OriginLab Technical Support Team
Go to Top of Page

pavi-chem

United Kingdom
26 Posts

Posted - 08/28/2024 :  07:39:38 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Awesome, Thank you! :)
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000