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 for Programming
 Forum for Origin C
 bin worksheet?

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
jspector Posted - 03/31/2008 : 12:55:21 PM
Origin Version (Select Help-->About Origin): 7.5 SR6
Operating System: XP

I have a bunch of worksheets with 3 columns each. I'd like to make a histogram from column 2, go to the bin worksheet, take the ln of the counts column, plot it and fit it to a quadratic, then repeat the process for column 3 of the worksheet, then move on to the next worksheet. I'm having trouble finding information on plotting histograms and accessing their bin worksheets using Origin C, can someone help, or send me to a resource that will... thanks,
-jspector
1   L A T E S T    R E P L I E S    (Newest First)
Iris_Bai Posted - 04/15/2008 : 05:20:24 AM
Hi Jspector,

Plot histogram and get Bin worksheet please refer to the following codes:

void show_plot_histogram(int nColIndex = 1)
{
Worksheet wks = Project.ActiveLayer();
if( !wks )
{
MessageBox(NULL, "Please keep worksheet active!", "Error");
return;
}

GraphPage gp;
gp.Create("HIST");
GraphLayer gl = gp.Layers();

Curve cv(wks, nColIndex);
if( gl.AddPlot(cv, IDM_PLOT_HISTOGRAM_TYPE) >= 0)
{
gl.Rescale();
}

get_bin();//get bin data and put into one hidden worksheet
}

void get_bin()
{
string strLTCmd = "get %C -nhwc A; win -o %A {win -h 1;};";
LT_execute(strLTCmd);
}


Iris

Edited by - Iris_Bai on 04/15/2008 05:59:41 AM

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