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
 problem with 2D contour plot
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

sanjinwx

Germany
Posts

Posted - 01/18/2007 :  08:31:22 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5
Operating System:WINDOWS XP

For the 2D contour plot, normally a square picture can be got. If the dimensions of X and Y are not the same,the unit scales of X and Y which represent the real length will not be the same.
But now I want to get a plot with same unit scale of X and Y, which means a rectangular picture will be get.
I really do not how to do this, is there somebody who can help me?
Thanks a lot.

easwar

USA
1965 Posts

Posted - 01/18/2007 :  09:32:53 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

With the contour graph window active, bring up the Script Window and then copy-paste the lines of script shown below. Then select all the lines and press enter to execute the script.

Easwar
OriginLab


oldunit=layer.unit;
layer.unit = 2;
dwidth = x2 - x1;
dheight = y2 - y1;
if(dwidth/dheight > 1)
{
layer.height = layer.width * dheight / dwidth;
}
else
{
layer.width = layer.height * dwidth / dheight;
}
layer.unit=oldunit;


Go to Top of Page

sanjinwx

Germany
Posts

Posted - 01/18/2007 :  10:24:22 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
sorry,I have tried,but #Command Error!
Go to Top of Page

Laurie

USA
404 Posts

Posted - 01/18/2007 :  2:03:12 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Please copy all lines of script and paste to the Script Window. Please do not modify the script, but simply highlight the entire block (all lines) and press Enter to execute. If you do this, I can't think of a reason why you'd get a command error.

Please let me know what happens.

Thank you,
Laurie
OriginLab Technical Support
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