| 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?
|