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
 All Forums
 Origin Forum
 Origin Forum
 axes aspect ratio

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
nanomech Posted - 08/21/2002 : 08:21:52 AM
Hello everybody

I was looking for a function to rescale the x and y-axes so that the scale of the 2 are the same and that the y-axis is not enhanced (for instance if the x-axis is scaled from -10 to 10 and the y-axis from -2 to 2, that the units on the 2 axes are the same). Is there an easy way in Origin where this can be accomplished?

Thank you in advance.
1   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 09/06/2002 : 2:01:47 PM
Here's a script that does the trick (with //comments):

dx=x2-x1; // find the size of x scale
dy=y2-y1; // find the size of y scale
temp=layer.unit; // remember current layer units
layer.unit=2; // change to inches
if(dx>dy) {
layer.height=layer.height*dy/dx;
} else {
layer.width=layer.width*dx/dy;
}
layer.unit=temp; // restore original layer units

You could also include this script which centers the newly sized layer:

temp=layer.unit; // remember current layer units
layer.unit=2; // change to inches
layer.top=.5*(page.height/page.resy-layer.height);
layer.left=.5*(page.width/page.resx-layer.width);
layer.unit=temp; // restore original layer units



The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000