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
 LabTalk Forum
 Set tickwidth and ticklength in plotlayer
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Physiker23

UK
Posts

Posted - 10/07/2004 :  1:43:15 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello,

I am using Origin 6.0 and try to plot some data. Unfortunately the major and minor ticks for the x and y axis are not shown although I have sent the showaxes=1 command. This is due to the tickwidth being set to 0 as default. As soon as I sent the command for setting the tickwidth Origin crashes with the message: Origin60.exe has generated errors and will be closed by Windows. You will need to restart the program.

My Labtalk code is:

win -n plot Test; #Creat window for plot
page -o l; #Set page to landscape format
layer -w Data1 1 0 2 0 200; #Plot column 1 and 2 to layer 1
layer 68.2 64.6 17.9 18.8; #Set layersize
layer -at;

layer1.showlabel=1;
label -xb Wavelength (\f:Symbol(m)m);
label -yl MRE (%); #Label axes
layer1.Y.opposite=1;
layer1.X.opposite=1; #Show y2 and x2 axes

layer1.y.majorticks=8; #Set numbers of ticks
layer1.y.minorticks=3;
layer1.x.majorticks=10;
layer1.x.minorticks=3;

layer1.y.showaxes=1;
layer1.x.showaxes=1; #Show tick on axes
layer1.y.ticks=5;
layer1.x.ticks=5; #Show major and minor tick in

layer.tickl=5; #Set ticklength;
layer.tickw=0.3; #Set tickwidth;

Could you please help me correcting my code? Or is there an other solution to get ticks in plots with Origin 6?

Thank you very, very much in advance,
Julia

Mike Buess

USA
3037 Posts

Posted - 10/07/2004 :  2:32:36 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Julia,

According to the Origin 7.5 Programming Guide
quote:
This [win -n] option is not recommended for creating graph windows. Use the win -t command option instead.
win -t is much better because you can save most of the graph settings in the template. Default graph template is Origin.otp. Open with Open Template button, change layer size, tick options, etc. as desired then select File->Save Template As. Name it MyTemplate.otp or whatever you like. Instead of 'win -n plot Test' use

win -t plot MyTemplate Test;

Most of the layer commands in your script will be unnecessary.

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