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
 Editing GraphObjects

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
greadey Posted - 02/24/2005 : 06:31:34 AM
Hi All,

I've found how to verify the existance of various GraphObjects such as XB, Legend etc.

Are there any functions which allow me to edit these objects, e.g. set the x-axis title, update the legend etc?

I also note that for the GraphObjects placed in a default plot there are some funny and not altogether intuitive names such as "_202". These are documented in the graph.h file but is there any other documentation which decribes these objects and their purpose.

Cheers all.
3   L A T E S T    R E P L I E S    (Newest First)
greadey Posted - 02/24/2005 : 12:28:07 PM
Luverly Jubberly Mike, thanks.

It works a treat now.

Gav.
Mike Buess Posted - 02/24/2005 : 07:46:17 AM
Not sure why your label command isn't working although I see a couple mistakes or typos in your examples. However, once you've declared XB as a GraphObject then simply XB.Text will work...

GraphLayer gl = Project.ActiveLayer();
GraphObject xb;
xb = gl.GraphObjects("XB");
if( xb.IsValid() )
{
xb.Text = "Current density / mA cm\\+(-2)";
}

(You need to double the character \ when it occurs which is why your superscript didn't work. Recall all Origin C paths you've seen.)

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 02/24/2005 07:48:42 AM
greadey Posted - 02/24/2005 : 07:08:45 AM
Update,

Dedcided to try the LT_execute method withthe command

label -xb "Current density / mA cm\+(-2)"

Origin C does not like the following;

LT_execute("label -xb"Current density / mA cm\+(-2)"");

so I tried this;

string LTstr;

LTstr = "Current density / mA cm\+(-2)";

LTstr = "label -xb" + LTstr;

LT_execute(LTstr);

The above compiled and my program got right to the end, but instead of my X axis title being replaced (As was my intention) I got the following x axis label;

density / mA cm2
X Axis Title

(the 2 was superscripted)

So, not only was my title not replaced, I also lost the first part of my new title.

Any ideas?




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