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
 Forum for Origin C
 Tree for graph layer props / doc for Axis method
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

PhilTHy

UK
Posts

Posted - 11/17/2006 :  07:01:31 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5
Operating System: Windows XP

when I append a graph layer
GraphPage gp;
Layer gp.AppendLayers("origin");

the size & axes new layer doesn't automatically link to the parent layer

I want to set them so they do - effectively, set the parameters that we would access in the GUI through the "Plot Details" dialog, selecting the layer and then in the tabs "Size/Speed", "Link Axis scales" and "Display".

Intuitively I need to attach a tree - but what is the syntax for the relevent tree ?


Also, where is the documentation for the Axes class ? Not in the Programming help file or the Doxygen help download from the file share. The following code fragment shows the data fields, but setting Incrementby didn't behave how I'd expect

Axis xAx = gl.XAxis;
Tree tr_XaxisFormat;
tr_XaxisFormat = gl.XAxis.Scale;
out_tree(tr_XaxisFormat);


Thanks

Phil

Mike Buess

USA
3037 Posts

Posted - 11/17/2006 :  1:25:50 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Phil,

As you've discovered, this area is not well documented and most Origin object properties must be mapped to a tree by trial and error. I've found the following mappings for graph layer properties. (There are probably more.)

out_tree(gl.Dimension);
Dimension
-Units = 0
-Left = 17.9
-Top = 11.6
-Width = 68.2
-Height = 71.8

out_tree(gl.Display);
Display
-ShowData = 1
-ShowLabels = 1
-ShowAxisX = 1
-ShowAxisY = 1
-ShowAxisZ = 0
-Scale = 0
-FixedFactor = 1.

out_tree(gl.Link);
Link
-LinkTo = 0
-XAxisLink = 0
-X1 =
-X2 =
-YAxisLink = 0
-Y1 =
-Y2 =

out_tree(gl.XAxis.Scale);
Scale
-From = -2.5
-To = 32.5
-Type = 0
-Rescale = 1
-IncrementBy = 1
-Value = 10.
-MajorTicksCount = 4
-MinorTicksCount = 1
-FirstTickPosition =

The Scale tree represents settings found on Format > Axes > X Axis (Scale tab). IncrementBy = 0 means the Increment radio button is selected while IncrementBy = 1 means the # Major Ticks button is selected. Value is the Increment value.

Mike Buess
Origin WebRing Member
Go to Top of Page

PhilTHy

UK
Posts

Posted - 11/18/2006 :  6:13:40 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks Mike this works beautifully

amazing what a little documentation can do...
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