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
Topic
rtsen
Canada
5 Posts
Posted - 04/15/2003 : 4:32:54 PM
how would I plot a dataset as a histogram. I am currently using the column plot but I can't adjust the bin size afterwards with labtalk.
for example:
wks.addCol(temp);
data1_temp1=histogram(Data1_a,1,0,200);
win -t Plot column;
label -xb "intensity";
label -yl "counts";
layer -i Data1_temp1;
Rescale;
but then I can't change the bin values with the following code:
get %C -hbb MIN;
get %C -hbe MAX;
get %C -hbs BIN;
getn Minimum min Maximum max Step bin (Re-bin Histogram);
set %C -hbb min;
set %C -hbe max;
set %C -hbs bin;
layer -a;
Laurie
USA
404 Posts
Posted - 04/21/2003 : 10:28:14 AM
The histogram plot type is different from the column plot type. Use the following:
win -t Plot hist; //create from histogram template
layer -i Data1_temp1; //add data to layer
layer -a; //rescale axes
When Origin creates a histogram by selecting Plot:Statistical Graphs:Histogram, it also runs this code:
get %C -nhwc A; //Create the frequency worksheet associated with the histogram.
win -o %A {win -h 1;}; //hides this freq. wks
OriginLab Technical Support
rtsen
Canada
5 Posts
Posted - 04/24/2003 : 12:18:29 PM
thanks for the reply,
I was wondering when you plot the histogram using:
win -t Plot hist; //create from histogram template
layer -i Data1_temp1; //add data to layer
layer -a; //rescale axes
is there a way to scale the x-axis to start at the min and end at the max which is determined by the range of the dataset.
Also when you use the following commands to get the frequency to show in a new worksheet:
get %C -nhwc A;
win -o %A {win -h 1;};
and when you change the bin of the histogram graph with:
get %C -hbb MIN;
get %C -hbe MAX;
get %C -hbs BIN;
getn Minimum min Maximum max Step bin
set %C -hbb min;
set %C -hbe max;
set %C -hbs bin;
layer -a;
can you automatically change the bin size on the new worksheet you created before to show the updated values.
thank you in advance
Laurie
USA
404 Posts
Posted - 04/25/2003 : 09:46:02 AM
You can use the limit command. The limit command operates on a Y dataset but will return the xmin and xmax for the corresponding X dataset.
limit data1_temp1;
limit.xmin=;
limit.xmax=;
You can then use the following (when the graph window is active):
layer.x.from=limit.xmin;
layer.x.to=limit.xmax;
When you use the following 3 commands:
set %C -hbb min;
set %C -hbe max;
set %C -hbs bin;
The hidden Bin1 worksheet automatically updates. Is this not happening?
OriginLab Technical Support
Topic
New Topic
Reply to Topic
Printer Friendly
Jump To:
Select Forum
Origin Forum
Origin Forum
Origin Viewer Forum
Origin Forum for Programming
Forum for Python
LabTalk Forum
Forum for Origin C
Forum for Automation Server/COM and LabVIEW
Origin中文论坛
Origin 中文论坛 (Chinese Origin Forum)
Japanese Origin Forum
Origin日本語フォーラム (Japanese Origin Forum)
Origin on Linux
The Origin on Linux Forum
Private Forums
Distributor Forum
--------------------
Home
Active Topics
Frequently Asked Questions
Member Information
Search Page
The Origin Forum
© 2020 Originlab Corporation
Snitz Forums 2000