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
 Problem with Scale- and axis-properties
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

klunz

Germany
Posts

Posted - 09/21/2007 :  04:00:39 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

Mike Buess

USA
3037 Posts

Posted - 09/21/2007 :  08:54:53 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
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