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
 Problem with Scale- and axis-properties

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
klunz Posted - 09/21/2007 : 04:00:39 AM
Origin Version (Select Help-->About Origin): 7.5G SR6
Operating System: XP

Hello,

I experience a couple of problems when trying to alter the Properties of Graph-Axes. The code looks like this (mostly thanks to Mike ):

 
GraphPage graphFourier("FFTPlot");
if (!graphFourier)
{
graphFourier.Create("FFT"); // Graph erzeugen
graphFourier.Rename("FFTPlot");
LT_execute("lab -xb (Frequenz [THz]);");
LT_execute("lab -yl (Amplitude);");
}
GraphLayer graphSchicht2 = graphFourier.Layers(); // Schicht im Graph erzeugen
Curve kurveFourier(tabelleFourier,0,3); // Kurve definieren

string kurveName2 = kurveFourier.GetName(); // name of curve
DataPlot kurvePlot2(graphSchicht2.DataPlots(kurveName2));
if( !kurvePlot2 ) // if data plot does not exist
graphSchicht2.AddPlot(kurveFourier, IDM_PLOT_LINE);

graphSchicht2.Rescale(); // Skalieren
graphSchicht2.X.From = 0;
graphSchicht2.X.To = 5;
graphSchicht2.Y.Type = 1;
graphSchicht2.Y.From = 0;
graphSchicht2.Y.Inc = 1;

graphSchicht2.Y.MajorTicks = 8;
graphSchicht2.X2.ShowAxes = 1;
graphSchicht2.Y2.ShowAxes = 1;


- On the last 3 lines, I get "Variable is not defined"-Errors. The "to"-, "from"- and "inc"-properties above work just fine, besides the "majorticks" property some others like "ticks", "minorticks", "opposite" and so on give me the same error. Letter capitalization is not the reason, I basically tried every possibility. (Btw, the Properties that work only do so when the first letter is capitalized, in the help-file they are all lower-case, just for the record).
Now I dont have any clue why some properties work and others just dont.

-The Second problem is, that on the last 2 lines i get an additional error in the Script-Window which says "<*><*><*><*><*><*> ID translation format error."
Obviously the right X- and the upper Y-Axis are not useable and again I have no clue why this is so. I tried
 Scale xAchseRechts(graphSchicht2.X2) 

because I thought I had to define them first, but this didnt work either.

I dont know if maybe another problem has to do with this:
Since this morning, everytime I run the Programm i get this Message in the Script-Window:
"@@@@@PLEASE REPORT THIS ERROR Class member not linked to dll"
The Programm seems to run fine, and frankly I dont know what or where to report to.

Thanks in advance for your help and have a nice weekend everyone
Tobi

Edited by - klunz on 09/21/2007 04:29:29 AM
1   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 09/21/2007 : 08:54:53 AM
Hi Tobi,

The last three properties are simply not valid in OriginC. You can use the corresponding LabTalk properties like this...

graphSchicht2.LT_execute("layer.Y.majorTicks=8");
graphSchicht2.LT_execute("layer.X2.showAxes=1");
graphSchicht2.LT_execute("layer.Y2.showAxes=1");

Sometimes after repeatedly executing code that generates errors Origin gets in a programming rut, so to speak. I suggest you restart Origin.

Mike Buess
Origin WebRing Member

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