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
 All Forums
 Origin Forum
 Origin Forum
 Plotting dataset with two X-axis and one Y-axis

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
titties Posted - 05/25/2006 : 05:02:21 AM
Origin Version (Select Help-->About Origin): 7.5
Operating System:Win XP

Hi all

I have an ASCII file containing 3 columns of data;
1 is wavenumber (X-axis)
2 is wavelengt (X-axis)
3 is Y-axis

if you plot wavenumber against y-axis and plot wavelength against y-axis it is the same graph. The difference is just the units of the x-axis.

I wish to make a plot, where I've the bottom x-axis as the wavenumber, and then the wavelength on the top x-axis, so one can see which wavenumber corresponds to which wavelength.

How do I do this?

I'll be glad to elaborate on the question.

Hope someone can help..

Thx

13   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 05/29/2006 : 10:27:17 AM
Your worksheet has Wavelength(X), Wavenumber(Y) and Epsilon(Y) columns and your graph has the Wavenumber axis at the bottom and Wavelength axis at the top. The Integration tool and menu command areas differ because the menu command integrates from the graph window while the Integration Tool integrates from the worksheet. When the graph is active Origin thinks the X dataset (xof(%C)) is the Wavenumber(Y) column but from the worksheet it is Wavelength(X). The solution is to set the Wavenumber column as X so the worksheet and graph use the same X dataset.

While the graph is active %A=layer.x2.label.formula$ gives %A=1E7*(1/x). Therefore, you must have created the graph as follows.

1. Start with Wavelength(X1), Wavenumber(X2) and Epsilon(Y2) columns and plot Epsilon(Y2) vs Wavenumber(X2).
2. Use Method I in the article I cited to draw the top (Wavelength) tick labels.
3. Restore the worksheet and set the Wavenumber column to Y.

The discrepancy in areas was caused by step 3.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 05/29/2006 10:49:29 AM
titties Posted - 05/28/2006 : 12:05:00 PM
Project has been sent. Thx

The negative value is just because of an inverted x-axis, so the lower limits gets larger than the upper limit. It doesnt matter, i just look away from minus sign, because:

integral from a to b = - integral from b to a

Edited by - titties on 05/28/2006 12:05:25 PM
Mike Buess Posted - 05/28/2006 : 11:53:03 AM
There is indeed a discrepancy in the results and the only somewhat unusual thing I see about those results is the negative area. Yet I still cannot reproduce the discrepancy using data that I have on hand... even if I invert to create negative areas. I'm afraid I need to see your project. Please email it to mlb@nmrtools.com .

Mike Buess
Origin WebRing Member
titties Posted - 05/28/2006 : 11:34:36 AM
Analys -> calculate -> integrate:
quote:

[28-05-2006 17:30 "/Graph1" (2453883)]
Integration of Data2_Epsilon from zero:
i = 261 --> 468
x = 30746,4 --> 23532,1
Area Peak at Width Height
------------------------------------------------------------
-8,31202E7 27380,6 -4046,50998 20898,4


Integration tool:


quote:
[28-05-2006 17:33 "/Graph1" (2453883)]
Integral: (unsaved)
Data: Data2_Epsilon
Baseline: linear, left offset= 0 , right offset= 0
BL Range: 50000 -> 22222,2
Limits: 30746,4 -> 23532,1
TotalArea PeakCenter PeakHeight PeakWidth PeakCentroid PeakVariance
---------------------------------------------------------------------------
-1,09096E6 365,2 20898,4 53,02537 363,6037 343,62565
---------------------------------------------------------------------------


Mike Buess Posted - 05/28/2006 : 07:31:29 AM
quote:
ok, now i've tested the result with my teacher, and it appears that the correct value was obtained with the analysis ->calculus -> integrate.

The integration tool gave a wrong result.

How could this be? Has it something to do with the different methods use of baselines?
Unless you used different baselines or limits the command and tool will give the same result as I showed with the result log readouts above. This has always been the case whenever I've compared the methods. Perhaps there's something unusual about your graph or data so please email your project to me at mlb@nmrtools.com. Or paste the result log readouts to a post here as I did above. I might be able to tell from those what went wrong.

...Note that Analysis > Calculus > Integrate always integrates from a zero baseline so using any non-zero baseline with the Integration Tool will give you a different answer.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 05/28/2006 08:48:02 AM

Edited by - Mike Buess on 05/28/2006 11:06:29 AM
titties Posted - 05/28/2006 : 04:56:53 AM
ok, now i've tested the result with my teacher, and it appears that the correct value was obtained with the analysis ->calculus -> integrate.

The integration tool gave a wrong result.

How could this be? Has it something to do with the different methods use of baselines?

Thx

Edited by - titties on 05/28/2006 04:57:17 AM
titties Posted - 05/26/2006 : 03:12:37 AM
Thank you Mike.

I think I've found the reason for the different data. As I started this thread i wanted to make 2 x-axis, every point on either x-axis will yield the same y-value. When I integrate using the plot with two x-axis I actually think that the data selector uses the top x-axis and the Integration tool uses the bottom one. And when integrating on my graph it must be done with the units from the bottom axis, otherwise it'll be wrong.
But later today, I'll try downloading the cluster tool, to obtain a 4th value
Mike Buess Posted - 05/25/2006 : 4:36:48 PM
quote:
However, i obtain very different results when using the Data Selector and Integration tool to integrate over same limits
Sorry, but I can't reproduce that. Integration Tool and Analysis > Calculus > Integrate yield the same area for the same limits. Here are the Result Log readouts for Graph2 in IntegrationTool.opj...

# Integration Tool readout
[5/25/2006 16:24 "/Graph2" (2453880)]
Integral: (unsaved)
Data: Data2_B
Baseline: linear, left offset= 0 , right offset= 0
BL Range: 0 -> 16015.625
Limits: 3027.34375 -> 7031.25
TotalArea PeakCenter PeakHeight PeakWidth PeakCentroid PeakVariance
---------------------------------------------------------------------------
1626.556152 4980.46875 2.91373 498.833661 5045.638513 180417.53769
---------------------------------------------------------------------------

# Analysis > Calculus > Integrate readout
[5/25/2006 16:25 "/Graph2" (2453880)]
Integration of Data2_B from zero:
i = 32 --> 73
x = 3027.34375 --> 7031.25
Area Peak at Width Height
------------------------------------------------------------
1626.556152 4980.46875 498.833661 2.91373
quote:
when I calculated it manually and with maple, i obtained a third result
Perhaps you just summed the Y values which is not quite the same as integration. When I select the same points with the Cluster Tool I get a sum of 16.6292. LabTalk's integrate command uses the trapezoidal rule. I don't remember off hand the details but integration has to introduce a factor involving X increment. The increment for Graph2 is 97.65625 and 97.65625*16.6292=1623.945, which is quite close to the Area=1626.556152 reported by the integrate command. The difference lies in the details of the trapezoidal rule.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 05/25/2006 5:09:28 PM

Edited by - Mike Buess on 05/25/2006 5:17:55 PM
titties Posted - 05/25/2006 : 12:23:29 PM
OMG, when I calculated it manually and with maple, i obtained a third result.. hehe.....

Edited by - titties on 05/25/2006 12:24:03 PM

Edited by - titties on 05/25/2006 12:24:24 PM
titties Posted - 05/25/2006 : 11:03:44 AM
Thx mike.. Nice tools :o)

However, i obtain very different results when using the Data Selector and Integration tool to integrate over same limits....

I am not sure which is correct...

Mike Buess Posted - 05/25/2006 : 08:46:52 AM
Use the Data Selector button (Tools toolbar) to mark the region of interest. Then integrate.

...You can also use the Cluster Tool to find the sum of all points enclosed by a rectangle. And the Integration Tool provides graphical control of integration.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 05/25/2006 09:03:44 AM

Edited by - Mike Buess on 05/25/2006 10:03:31 AM
titties Posted - 05/25/2006 : 08:39:34 AM
Thank you veru much, Mike - that helped :0)

Is there anyway to calculate the area under the curve from, say 325 to 425?

I can only integrate the whole plot...

Thx again
Mike Buess Posted - 05/25/2006 : 07:25:23 AM
http://www.originlab.com/www/support/resultstech.aspx?language=english&ID=1116

For your data the steps are even simpler than described above...

1. Move the wavelength X column to last position.
2. Plot the Y column.
3. Select Format > Axis Tick Labels > X Axis... and select Top axis on the left.
4. Check Show Major Labels with Type= Text from dataset and choose your wavelength column as Dataset.
5. Go to the Title and Format tab and check Show Axis & Ticks for top axis.
6. Click OK.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 05/25/2006 08:33:48 AM

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000