T O P I C R E V I E W |
rtsen |
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;
|
3 L A T E S T R E P L I E S (Newest First) |
Laurie |
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 |
rtsen |
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 |
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 |