Author |
Topic |
|
kemeyer
39 Posts |
Posted - 08/31/2009 : 10:38:35 AM
|
Origin Ver. 7 and Service Release (Select Help-->About Origin): Operating System: XP
I have two different spectrometers-one uses photon counting and the other uses lock in amplifier. Because of this, when the graphs are generated, they are done so with units of either Counts or Volts. We just newly added the spectrometer that uses photon counting, and I found that I had a problem. I had written some code to generate graphs, but they were using templates that had Volts, not Counts. Is there any good way I can distinguish which spectrometer generated which data so that I can have the program choose the correct template?
I had thought perhaps it could read the original y axis labels to see if it was counts or volts, and choose then, but how do I access this information via Labtalk or Origin C?
If you have any other methods of using the correct graph template, please let me know. That is just the first thing that came to mind.
Thanks, Katie |
|
greg
USA
1379 Posts |
Posted - 09/02/2009 : 2:56:56 PM
|
It isn't clear what you mean by "y axis labels", but I am going to guess you mean the Label Column information.
Worksheet Column Labels can be accessed with %A = wks.col#.label$; like %A = wks.col3.label$; Since Column Labels can be multiline, you may need some additional processing to test for Volts/Counts: // Test if line 2 of %A is Volts if("%[%A,@2]"=="Volts") { <Use Volts template for plotting> } if("%[%A,@2]"=="Counts") { <Use Counts template for plotting> }
Of course Origin 8 users can access Column Row Headers by shorthand name (here I reference the 'U' for Units row header): if(col(3)[U]$=="Volts") { <Use Volts template for plotting> } if(col(3)[U]$=="Counts") { <Use Counts template for plotting> }
|
|
|
kemeyer
39 Posts |
Posted - 09/04/2009 : 08:54:33 AM
|
Sorry I wasn't clear. What I ment are the text labels on the graph for the Y axis. I am not sure if they are also the label column info. (I know that on my worksheet, it simply has A(x) and B(y) when generated, so I don't think it is the label column info unless it isn't normally visable upon the worksheet.)
|
|
|
greg
USA
1379 Posts |
Posted - 09/14/2009 : 10:22:16 AM
|
The Axis Titles are controlled by Template settings. Most Origin default Templates have their X and Y axis text set to %(?X) %(?Y) which tells Origin to show the information from the X or Y source data column. If the source data columns has Long Name information, then that is shown, otherwise column Short Name information is shown. You can of course programmatically set the axis titles: YL.TEXT$ = My Y Axis Title; XB.TEXT$ = My X Axis Title;
|
|
|
|
Topic |
|
|
|