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
 Forum for Origin C
 Access to X/Y Lables in GraphLayers

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
datrix Posted - 07/15/2009 : 7:20:14 PM
Hello,
itīs me again, with a probably easy question.
Can somebody help me with the right syntax to access the X / Y Labels
in a GraphLayer? I tried the part marked in red and other combinations.

-----------------------

string CreateYLogScaleGraphObject(double x_beg, double x_end, double x_inc, string x_label, double y_beg, double y_end, string y_label){

GraphPage grphData;
grphData.Create("line.otp");
GraphLayer grphLayer = grphData.Layers();
Scale sc;

// X Scaling
sc = grphLayer.X;
sc.From = x_beg;
sc.To = x_end;
sc.Type = LINEAR_SPACE;
sc.Inc = x_inc;

grphLayer.LT_execute("lab -s -xb;", x_label);

// Y Scaling
sc = grphLayer.Y;
sc.From = y_beg;
sc.To = y_end;
sc.Type = LOG10_SPACE;
sc.Inc = 1;

grphLayer.LT_execute("layer.y.minorTicks = 8");

grphLayer.LT_execute("lab -s -yl;", y_label);
return grphData.GetName();

}

-----------------------

Is it possible to access the labels with internal Origin Object Classes instead of LabTalk-Script commands?

Thanks,
datrix
2   L A T E S T    R E P L I E S    (Newest First)
datrix Posted - 07/16/2009 : 05:35:20 AM
Exactly, what Iīve been looking for.
Works like a charm. ;)

Thanks from Germany.
datrix

cpyang Posted - 07/15/2009 : 9:13:46 PM
The names of the XY titles are

XB = X bottom
YL = Y Left
XT = X Top
XR = X Right

You can then just access them by

grphLayer.GraphObjects("YL");

and use the .Text property to access the label, see

http://ocwiki.originlab.com/index.php?title=Category:GraphObject_%28class%29


CP

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