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 for Programming
 LabTalk Forum
 Labtalk and changing x-axis titles

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
cdrozdowski111 Posted - 12/20/2012 : 10:01:19 AM
OriginPro 9.0.0 (Student Version), Win7 64-bit, running in VMware Fusion 5.0.2

I would like, using LabTalk (w/o having to resort to a UI dialog intervention in the middle of the script), to change the X-axis title for a given layer. BUT only if there is an axis title object for the layer (e.g. it didn't get manually deleted from the layer or the title is set to display via the "Show Axis & Ticks" setting of the Format Axis dialog).

Let me explain. I have a number of graph templates from which I can create graphs. They all have the x-axis in wavelength and some even have multiple layers. I am writing a script to convert the x-axes to wavenumber. I've got it all done except for dealing with the title(s) for the x-axes.

My script, as it converts the x-axes, needs to change the axis title. But some graph templates (or layers therein) may not have x-axis titles to begin with.

Is it possible to check for the existence or diaplay of the x-axis title for graph layers?


Is this possible?
2   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 12/21/2012 : 2:59:21 PM
This logic should cover it:

if(XB.X!=NANUM)
{
if(XB.SHOW == 0)
ty XB exists and is hidden;
else
ty XB exists and is visible;
}
else
ty XB does not exist;
cdrozdowski111 Posted - 12/21/2012 : 07:51:58 AM
I found a partial solution- detecting whether an existing X-axis title is visible or not. I cannot find a way to determine if there is actually a title object or not.

I though I'd share it in case someone else ever searches for it.

// Change x-axis title and respect it's visibility
int nXBShow = XB.show;

XB.text$ = "New Title";

if ($(nXBShow) == 0)
{
XB.show = 0;
}

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