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
 Improving the y-axis rescale option for graphs
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

DrMorbid

United Kingdom
14 Posts

Posted - 09/04/2014 :  6:14:07 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello,

is it possible in Origin to kind of combine the "fixed from" and "auto" rescale options for graphs? The current that I measure from my devices is always larger than zero, but the maximum value differs between batches of devices. So, using the "fixed from " option on its own is not good and the "auto" rescale option is also not perfect either, as it means that my graph will show the negative current values, which I never measure.

Ideally I would like not to have lots of empty space in my graphs as I currently do. I would prefer to be able to use Labtalk for this, as I test many devices and doing this by hand would take ages. Thank you!

SeanMao

China
288 Posts

Posted - 09/04/2014 :  11:34:34 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi DrMorbid,

You may try the code below:

layer.x.from = 4; // Set the value for fixedfrom
layer.x.rescale = 4; // Set rescale mode to be fixedfrom
layer -a; // perform rescale of active layer


Search layer.axis.rescale in Labtalk help, you will find that there are 5 modes you can choose to do rescale: 1 = manual, 2 = normal, 3 = auto, 4 = fixed from, 5 = fixed to.

Hope that works for you!

Sean

OriginLab Tech. Service
Go to Top of Page

DrMorbid

United Kingdom
14 Posts

Posted - 09/05/2014 :  7:21:17 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello Sean,

thank you for your suggestions, they do help a bit, but what I end up with in the end is that my graph is uside down. Please see the two files I've attached; a) is what is happening now and b) is what I would like to generate automatically. Apologies I did not properly explain what I am measuring: the current I am interested in is negative, but there will be some positive values as well (for x > 0), which are of no relevance and I do not have to show them.

Thank you!

Go to Top of Page

SeanMao

China
288 Posts

Posted - 09/09/2014 :  10:44:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Try the following code and see if it works for you:

layer.y.rescale=3;// rescale set as Auto
layer -a;// apply rescale
ff = layer.y.from;// record from after rescale
layer.y.from = 0;// manually set from as 0
layer.y.to=ff;// set to as min after rescale


Regards!

Sean
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