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
 Simple Histogram Question

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
O-2 Posted - 05/02/2014 : 02:09:17 AM
I have a very simple data set consisting of two columns of integers.

I would like to produce a histogram of Column B across the range of Column A. i.e. bin up the numbers in column B for each corresponding value of A.

For example, if I have the data set: -

A B
0 1
1 1
2 3
1 0
3 2
1 2
2 2

I would like to plot B vs A, but binning each value of B, so what would actually be plotted is: -

A B
0 1
1 3
2 5
3 2

There must be an automated histogram tool that does this.

I'm sorry for the simple question.
5   L A T E S T    R E P L I E S    (Newest First)
O-2 Posted - 05/03/2014 : 03:52:52 AM
Thank you all, the pivot table solution worked very well.
lkb0221 Posted - 05/02/2014 : 1:54:04 PM
Since DrBob mentioned, I re-post the pivot table method here in case someone is interested.
Drbobshepherd Posted - 05/02/2014 : 12:42:28 PM
O-2,

CLARIFICATION:

When I wrote,
quote:
one set of (A,B) values

I meant "one complete group of A-B data", not "one (A,B) data point". For example, the data you presented in your post would be one group of A-B data; then next month, you may have another set of A-B data.

DrBob
Drbobshepherd Posted - 05/02/2014 : 12:18:18 PM
O-2,

Zheng's suggestion to use the Reduce Duplicate X Data tool is simple and straight-forward, but I liked his 1st suggestion (which I believe he retracted) to use a pivot table, because it is potentially more powerful. If you anticipate having more than one set of (A,B) values, the pivot table may be the better way to calculate your histograms.
.
For example, you could calculate sums according to the month the (A,B) value was collected. Simply add a third column to your data, enter the month for each data point, and use the Worksheet:Pivot Table tool to calculate your sums. This works even if you don't need to group your data (Just enter the same month for all points).

DrBob
lkb0221 Posted - 05/02/2014 : 10:15:14 AM
Hi,

You can use Analysis: Data Manipulation: Reduce Duplicate X Data tool


Zheng
OriginLab

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