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
 Doing many histograms

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
pmoreira Posted - 02/07/2014 : 1:28:17 PM
Dear all,

I wanna create histograms for all my columns in each worksheet. O did a code below, but it draws only a first histogram (DIP is a template). What am I doing wrong?


//BEGIN
doc -e W
{
// For all Worksheets in current Workbook
oop(iWks,1,page.nlayers);
{
// Make next Sheet active
page.active = iWks;
// For all columns in the active Sheet
loop(iCol,1,wks.ncols)
{

if (%(wks.col$(iCol).name$) == "A" || %(wks.col$(iCol).name$) == "B" || %(wks.col$(iCol).name$) == "C" && %(page.name$) == "A160"){
worksheet -p 219 DIP;
ty %(page.name$), %(layer.name$), %(wks.col$(iCol).name$);
};

}
}
}
8   L A T E S T    R E P L I E S    (Newest First)
lkb0221 Posted - 02/10/2014 : 11:38:31 AM
You can send by email to tech@originlab.com .

If the file is too big (>200K for example), you can use our FTP by following:
http://originlab.com/index.aspx?go=Support&pid=752
pmoreira Posted - 02/10/2014 : 11:33:16 AM
How can I send my file and a description what I need?

Pedro
lkb0221 Posted - 02/10/2014 : 11:06:21 AM
Hi,

Your range assignment is wrong.
you should use:

range rr1 = [Graph1]1!; // Layer 1 of Graph 1
range rr2 = [%H]1!; // Layer 1 of current graph window

Besides, I don't think changing Y scale of a histogram directly would be a good idea, for it will ruin your graph.
You can send us your opj file with some detailed description so that we can understand your requirement more clearly.

Zheng
OriginLab
pmoreira Posted - 02/10/2014 : 10:53:29 AM
Ok, I use my temnplate. But the scale on y-axis is changed automatically. I tried to rescale, using:

range ll = [%C]1!;
ll.y.from = 0.0;
ll.y.to = 0.1;


However, it is not working. It rescales in other values. What am I doing wrong? (Note: It works for x-axis)
lkb0221 Posted - 02/10/2014 : 09:57:55 AM
You have a template for those histograms, right?
You can include it into "plotxy" when creating, see the page below for details:
http://www.originlab.com/doc/X-Function/ref/plotxy
pmoreira Posted - 02/10/2014 : 07:32:33 AM
How can I change the properties of histogram created? Bin size, max, minimum and normalize the frequency (divided the y-axis by number)?
pmoreira Posted - 02/10/2014 : 07:12:43 AM
Zheng.

Thank you.

Pedro
lkb0221 Posted - 02/07/2014 : 2:14:34 PM
Hi,

There are three problems in your script.
1). The iWks loop should not have semicolon. (And you missed the letter "l")
2). "window -p" plots the selected column in the worksheet, if you want to use this command, you need to specify which columns are selected each time by "wks.colsel".
3). After each time you plotted a graph, the new graph window will be activated automatically. You need to activate the worksheet back.

The following is my modified script (the if condition is removed to make it simple):

//Start
doc -e W
{
//type This is %H;
%Z = %H; // Remember the workbook
loop(iWks,1,page.nlayers)
{
page.active = iWks;
//type This is Sheet $(iWks);
loop(iCol,1,wks.ncols)
{
plotxy iy:=$(iCol) plot:=219;
window -a %Z; // Activate the workbook
}
}
}
// End

Zheng
OriginLab

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