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
 Origin Forum
 Orthogonal charts on Origins.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

kentmey

United Kingdom
5 Posts

Posted - 05/14/2012 :  10:44:14 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi there,

I am currently plotting data on Originshttp://www.originlab.com/ftp/forum_and_kbase/Images/EIS.opj

How can I get autonomatically orthogonal scale, aka (for example)
The 0-20 length on the X axis of automatically the same length than the Y axis.

As far as I remember when I used Origin in the past, it was possible, but I can't find the settings right now. Any advice would be great.

Best regards,

Kentmey

Hideo Fujii

USA
1582 Posts

Posted - 05/14/2012 :  11:03:35 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Kentmey,

If you want to let the X and Y axes have equal physical length, you can run the following two-line script:
layer.unit=2; //set the layer size in absolute in inch
layer.width=layer.height; //or reversed
Does this work as you wanted?

--Hideo Fujii
OriginLab
Go to Top of Page

kentmey

United Kingdom
5 Posts

Posted - 05/14/2012 :  12:16:55 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
It does work, but I remember of an automatic way to do it (such as ticking "orthonormal mode" instead of normal for the axis).

at the beginning was origin
Go to Top of Page

greg

USA
1378 Posts

Posted - 05/14/2012 :  1:17:09 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
There has never been such a checkbox in Origin.

Incidently, the above works only if the X and Y scales have the same range. For the more general case, you would need:
// BEGIN SCRIPT
tempunit = layer.unit;
layer.unit = 2;
wlay = layer.width;
hlay = layer.height;
waxis = x2 - x1;
haxis = y2 - y1;
if(hlay/haxis < wlay/waxis)
{
layer.width = hlay * waxis/ haxis;
}
else
{
layer.height = wlay * haxis / waxis;
}
layer.unit = tempunit;
// END SCRIPT

Edited by - greg on 05/14/2012 1:48:31 PM
Go to Top of Page

kentmey

United Kingdom
5 Posts

Posted - 05/14/2012 :  2:35:34 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks both of you :)

kentmey

at the beginning was origin
Go to Top of Page

couturier

France
291 Posts

Posted - 05/16/2012 :  04:52:56 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Kentmey,

I've included Greg's code into a shortcut button, for easier re-use of this very convenient script.

This button is part of other shortcut buttons that you can download here. The one for orthonormal scale is the last one.

Hope it helps.
Go to Top of Page

kentmey

United Kingdom
5 Posts

Posted - 05/16/2012 :  05:05:47 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Whaooo :)

It does indeed.

Merci beaucoup,

Kentmey

at the beginning was origin
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