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
 Custom Buttons for graphs
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

drmetal

Germany
2 Posts

Posted - 09/24/2002 :  04:11:47 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,

I am looking for custom buttons that do the same as the line-graphbutton but one has the axis-titles "time/intensity" and the other "energy/counts" (for instance) as default axis-titles.
Is something like that possible with LabTalk ?

thanks
Heiko

Mike Buess

USA
3037 Posts

Posted - 09/24/2002 :  8:38:30 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Are you referring to the New Graph button that opens an empty plot window? If so, it runs the command

win -t Plot Origin; // Open a new plot window using the template Origin.otp

To create a button that does that and also changes the axis titles first open a new text file in Notepad. (If you are using Origin 7 you can do this in CodeBuilder instead.) Add the following section to the text file:

[Main]
win -t Plot Origin;
label -xb "time/intensity"; // set bottom axis title
label -yl "energy/counts"; // set left axis title

Save the file as NewPlot.ogs in your Origin program folder. (Of course you can name the file and the section header [Main] anything you want.)

Now that your script is ready you can assign it to a button. Select Toolbars on Origin's View menu and go to the Button Groups tab. Find User Defined on the Groups list, select the button labelled Plot and click the Settings button below. Enter the following Button Settings...

File: NewPlot
Section: Main
Arguments: (leave blank)
Tool Tip Text: (Enter the tool tip message you want to see when the mouse cursor is over the button.)
Status Bar: (Enter the status bar message)
Context: (Leave this alone for now.)

Click OK and drag the Plot button to any existing toolbar. Finally, close the Customize Toolbar dialog and try out your new button.

Mike Buess
Origin WebRing Member
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