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
 Panel plots' scaling
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

gardyloo

USA
Posts

Posted - 05/06/2004 :  9:02:30 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi, all,

I'm importing 9 data ASCII sets at a time, and plotting the resulting 2D time traces in a 9-panel template. Each of the data sets has the same time scale (X-axis), but they all have differing amplitudes (Y-axis). It seems that the default setting is to autoscale the axes, which is fine for the X-axis for me, but I'd like to have all of the Y-axes the same, automatically.

As it is, I'm going to each of the plots, figuring out which one has the highest amplitude (it's always the first one, which is nice, and is what I'd expect from the nature of how I have the data and experiment set up), autoscaling it, and then having to manually rescale each of the other 8 plots in the 9-panel layout.

Is there a way in which to rescale ALL of the plots at the same time, so that the Y-axis has the same scale on all of them? I've done some searches through the Forums and in Origin's online help, but can't seem to find an answer.

Thanks,
Curtis O.

gardyloo

USA
Posts

Posted - 05/06/2004 :  9:05:23 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Whoops! Forgot to mention that I'm using Origin 7.0. Thanks again!
Curtis
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 05/07/2004 :  12:37:35 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Curtis,

You can rescale all layers with this macro...
def RescaleAll
{
lay -o %1 {lay -a}; // rescale selected layer to show all data
yy1=layer%1.y.from; // lower limit in chosen layer
yy2=layer%1.y.to; //upper limit in chosen layer
// apply same limits to all layers
loop (i,1,page.nlayers)
{
layer$(i).y.from=yy1;
layer$(i).y.to=yy2;
};
};
After you've defined the macro enter "RescaleAll layerNumber" in the script window to scale all layers like layer layerNumber. For example,

RescaleAll 4;

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 05/07/2004 12:41:34 AM
Go to Top of Page

Mike

USA
357 Posts

Posted - 05/07/2004 :  09:37:26 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Mike, I made one small tweak to your macro so that all y scales have a common increment and no. of minor ticks. Hope that was okay.

Mike
OriginLab

def RescaleAll
{
lay -o %1 {lay -a}; // rescale selected layer to show all data
yy1=layer%1.y.from; // lower limit in chosen layer
yy2=layer%1.y.to; //upper limit in chosen layer
yyinc=layer%1.y.inc; // scale increment of selected layer
yymT=layer%1.y.minorTicks; // no of minor ticks
// apply same limits to all layers
loop (i,1,page.nlayers)
{
layer$(i).y.from=yy1;
layer$(i).y.to=yy2;
layer$(i).y.inc=yyinc;
layer$(i).y.minorTicks=yymT;
};
};
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