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
 Changing Axis Scale (Date Format)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Mulvenna

Germany
46 Posts

Posted - 10/23/2013 :  09:34:04 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. 8.6
Operating System: Windows 7

Hi Again,

I just keep coming up with problems,

I have an analysis workbook that each time my script is run, the workbook is opened and a new line of data is added to it.
The worksheet is linked to a graph that is plotted against date.
When the new data is added, the graph updates automatically no problem and plots correctly but the axis scale does not update.

What Command do I use to change the range of the scale when it is in date format? I have tried:

layer.x.to=01.01.2013
and
layer.x.to=01012013

but they are just read as numbers and therefore change the format of my axis, Origin then has a mental breakdown and can't process the date format tick labels so Im just left with a big gray square.

Any help at all would be great.

Thanks in advance.

Shirley_GZ

China
Posts

Posted - 10/28/2013 :  05:55:53 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

The Layer.Axis.to object is numeric. You can't set it to date value directly.

Please try below script:

range ll = [graph1]1!;
ll.x.to= date(4/1/2013);

Thanks,
Shirley

Originlab Technical Service Team
Go to Top of Page

Mulvenna

Germany
46 Posts

Posted - 10/28/2013 :  06:36:16 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Thanks Shirley, that worked perfectly.

Really appreciate the help.

Mulvenna
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