Questions tagged [bins]
235 questions
-1
votes
2 answers
Creating a non overlapping bins in R
I have a set of x,y data (10,000). These data points are to be partitioned along the x-axis into non-overlapping bins of 10 data points each. From this, I need a new dataset, such that x = mean of these 10 data, y = maximum of these 10 data. The…

zanak02
- 45
- 4
-1
votes
1 answer
How do I include the upper boundary of the bins in Matplotlib hist
When creating a histogram using hist() from matplotlib, the data falls into bins as such:
lb ≤ x < ub. How do I force it to behave like this: lb < x ≤ ub?
Additionally, the frequency table is shifted one bin lower compared to Excel, which produces…

Jason Axford
- 67
- 1
- 6
-1
votes
1 answer
Split an array into data based on bins returned by numpy histogram
I have an array x with data like this: [3.1, 3.0, 3.3, 3.5, 3.8, 3.75, 4.0] etc.
I have another variable y with corresponding 0s and 1s [0, 1, 0]
I want to get from that new separate arrays to have that divided
freq, bins = np.histogram(X, 5)
That…

shurup
- 751
- 10
- 33
-1
votes
1 answer
Spatial Accuracy Analysis in Python
I have a, hopefully, simple spatial analysis I'd like to perform in python. However, I haven't fully figured out how to get python to do what I want it to do.
I have a CSV file with 3 critical columns: Hit or Miss, X Location, Y Location. Each row…

Tom H
- 91
- 5
-1
votes
1 answer
How to get 1024 FFT bins from 600 shorts audio buffer. JAVA Android
I have gone through different questions in SO for this, but couldnt get answer for this.
How can I get 1024 fft bins from a data of 600 shorts audio buffer. If yes/no please explain.

user3292717
- 11
- 1
-2
votes
1 answer
How do I count data in each bin to get the PDF of a specific dataset?
I have an array of 1024x1024 values between 0 and 1 and I want to divide them into bins of size 0.05 (with first bin centered at 0, second centered at 0.05 ecc...) to compute the PDF for my data set. I'm having problems with calculating the number…

Zeta scientist
- 1
- 1
-2
votes
1 answer
Transaction Time in R
I have a list of bank transactions for different customers and each transaction has a transaction time.
I need to group the transactions into 24 bins, where each bin represents a one-hour interval, e.g: 8-9 am, 9-10 am, 22-23pm, and so on for 24…

Anadil
- 1
- 1
-3
votes
0 answers
Are unequal bin widths in histogram are bad?
I have age range from 18 to 69(inclusive). I want to plot a histogram to show the distribution of these age values.
But I want the bin_edges on histogram to be integers on x-axis and only cover the range 18 to 69 (inclusive). Not like 15 to 75…

Ali Haider
- 25
- 4
-3
votes
2 answers
How to count the number of items in several bins using loop in python? details showed in picture
Question details showed in the picture Thanks for your help.
Write a function histogram(values, dividers) that takes as argument a sequence of values and a sequence of bin dividers, and returns the histogram as a sequence of a suitable type (say,…

Jayyyyyy
- 197
- 1
- 10
-3
votes
1 answer
ggplot2: Group histogram data by year
I have a bunch of data with a YYYY-MM-DD date attached to it, and I'm having trouble getting a single bar for each year. In other words, all data from 2014 showing up under a bar for 2014.
The dates were converted to the YYYY-MM-DD format using…

Mako212
- 6,787
- 1
- 18
- 37