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 for Programming
 LabTalk Forum
 Reading axis labels
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

kemeyer

39 Posts

Posted - 08/31/2009 :  10:38:35 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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>
}
Go to Top of Page

kemeyer

39 Posts

Posted - 09/04/2009 :  08:54:33 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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.)

Go to Top of Page

greg

USA
1379 Posts

Posted - 09/14/2009 :  10:22:16 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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;
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