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
 orthonormal axes

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
boo Posted - 10/25/2006 : 5:25:16 PM
Origin Version (7.5):
Operating System:Windowsxp

I would like to know how I can plot graph with orthonormal axes
that's to say : x and y axes with same lentgh between to thick

Thank you in advance for your answer
4   L A T E S T    R E P L I E S    (Newest First)
boo Posted - 10/31/2006 : 4:02:20 PM
thank you for your answer
it's exactly what I wanted to do
Laurie Posted - 10/26/2006 : 12:55:29 PM
Ok, so let's say that your X axis scale is the following:
From = 0
To = 10

And the Y axis scale is the following:
From = 0
To = 5

You then want the following to be true:
10/width == 5/height

Select Format:Layer to open the Plot Details dialog. On the Size/Speed tab, first change the units from the relative units, % of page, to a fixed unit such as inches and then note the width and height. In my case the width is 7.27 inches and the height is 5.84 inches.

Therefore, if I leave the width at 7.27, the height needs to be set to 3.6, which is 5*7.27/10.

Note1: To graphically resize the layer and maintain the aspect ratio, hold down the CTRL key while resizing the layer.

Note2: The width and height and from and to values of the axes are Script Accessible.
layer.width and layer.height return the width and height values, respectively.
layer.x.from and layer.x.to return the from and to values for the X axis.
Likewise, layer.y.from and layer.y.to return from and to values for the Y axis.

The formula for height would then be the following:
height = (layer.y.to - layer.y.from) * layer.width / (layer.x.to - layer.x.from)

Here's a complete script, which you can run from the Script Window. (Select Window:Script Window and copy and paste the following script into the Script Window. Highlight the entire thing and press Enter. Your graph will then automatically resize):

oldunit=layer.unit;  //store current layer units
layer.unit=2; //set layer units to inches
xrange=abs(layer.x.to-layer.x.from);
yrange=abs(layer.y.to-layer.y.from);
width=layer.width;
height=layer.height;
if(xrange>yrange)
layer.height=width*yrange/xrange;
else
layer.width=height*xrange/yrange;
layer.unit=oldunit; //return layer units (changing units does not change layer size)
[



OriginLab Technical Support



boo Posted - 10/26/2006 : 09:40:22 AM
Hi,
I think I didn't write exactly what I was looking for.

I would like to draw axes with thicks the same length on screen.
If on the X axe one thick is 1 cm on screen, I would like that one thick on the Y axe (with the same value than on the X axe) measures 1cm on screen.

that's to say, if my y axe contains 5 units and my x axe contains 10 units, I would like my x axe to be 2 times longer than the y axe.

or if I have a square in reality I would like my graph to be a square.
I'm not sure if I'm clear

Thank you in advance for your answer
erica-cn Posted - 10/25/2006 : 11:06:51 PM
Hi Jod Magali:

If I get you right, what you meant is that you want to make x and y axes with same length between two ticks. To get this effect, you can do as follows:
1. Double-click on the axis tick labels to open the Axis dialog box.
2. Select scale tab
3. Type the value in the blank next to From, To and Increment.
4. select the other axis, and type the same value.
Then you can get the same length between two ticks on the two axis.

Any questions, Please feel free to contact us.

Erica shang
OriginLab Technical service


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