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 for Programming
 LabTalk Forum
 histogram
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

ovince

Yugoslavia
Posts

Posted - 01/29/2009 :  08:50:39 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,

I would like to plot histograms with this bellow
%A="histlessbox";

nLayers=5; //Number of Layers
%P=MyPlot;
win -t plot Column %P; //Create a new graph page
nn=nLayers-1;
repeat nn
{
page -L layer;
plot -L; //update the active layer
} //Generate multiple layers on the page

width=30;
height=30; //Layer width and height
cc=1;rr=0;
nCol=3;nRow=2;
win -a %P; //make active
j=2;
for (ii = 1; ii <= nLayers; ii++)
{
cc=mod(ii,nCol);
cc=cc==0?3:cc;
rr=cc==1?(rr+1):rr;
layer -s ii; //select the ii layer in the active window
layer width height (4+(cc-1)*(width+2)) (10+(rr-1)*(height+10)); //Arrange layer.
%A!wks.col$(j-1).type=4; //set to x;
%B = %A!wks.col$(j).name$;
layer -i %A_%B;
layer -a; //rescale axes to show all data
j=j+2;
};


In a result I get:



How to get histograms in all layers?

thanks
oliver

cpyang

USA
1406 Posts

Posted - 01/31/2009 :  10:04:51 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
If you mean that they should be plotted as column graph, then just replace

layer -i %A_%B;

with

layer -i203 %A_%B;

CP
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