Questions tagged [bins]

235 questions
0
votes
1 answer

MATLAB bins setting in histogram

I want to change how data are distributed in the histogram that I built.My histogram looks like But I want it to look like I set bins1=[10,30,50,70]; hist(data,bins1) How can I arrange the bins as in the second figure?
sam_rox
  • 739
  • 3
  • 14
  • 29
0
votes
0 answers

Comparing Histograms In Search For Similar Images (java)

Okay so I have an original image and I generate a histogram with bins for it. When I hit search it iterates through a image database and generates their histograms and uses some distance measures to display in order the most similar images to the…
Bad Dub
  • 1,503
  • 2
  • 22
  • 52
0
votes
4 answers

counts with 2 variables

In a research study I have 2 variables: x = number objects remembered y = % tasks completed correctly as follows: x = np.array([2,2,2,3,3,3,3,3,4,4,4,4,4,4,5,5,5,5,5,6,6,6,6,7,7]) y = np.array([1.0, 1.0, 1.0, 0.33, 0.33, 0.66, 0.66, 1.0, 1.0, 1.0,…
Panther33
  • 3
  • 1
0
votes
3 answers

MATLAB: How to make 2 histograms have the same bin width?

I am plotting 2 histograms of 2 distributions in 1 figure by Matlab. However, the result shows that 2 histograms do not have the same bin width although I use the same number for bins. How can we make 2 histograms have the same bin width? My code is…
Steven Huynh
  • 23
  • 1
  • 4
0
votes
1 answer

SAS- use proc arbor to bin variables

I'm trying to use PROC ARBOR to define bins for a continuous variable. The generated tree works well, and I can find the bin limits by visual exploration, but I would like to extract those bins and use them to discretize the original variable in an…
GabyLP
  • 3,649
  • 7
  • 45
  • 66
0
votes
1 answer

Labels do not fit to my bin center in histogram

I am experiencing problems to fit label in the right place under the histogram bins as you can see in the pic. I am using this code: ![# Category names my.names <- c("test1", "test2", "test3", "test4", "test5", "test6") # Example data data <-…
user1997567
  • 439
  • 4
  • 19
0
votes
3 answers

Create equal-size bins over given range

I want to create bins of equal size up to certain number. Example: for I want to create bin of size 10, over the range 0..100 0 10 10 20 20 30 . . . 90 100 I tried using "cut" but couldnt make it work for my purpose. I used r<-cut(100,4) but it…
user1631306
  • 4,350
  • 8
  • 39
  • 74
0
votes
1 answer

Need help in histogram in R

Following is head of my data: dput(head(trucksv[,c(1,5)])) structure(list(Measur. = c(1L, 2L, 3L, 4L, 5L, 1L), Speed.Mean.Trucks = c(NA, NA, 9.5, 4.5, NA, NA)), .Names = c("Measur.", "Speed.Mean.Trucks" ), row.names = c(1L, 2L, 3L, 4L, 5L, 17L),…
umair durrani
  • 5,597
  • 8
  • 45
  • 85
0
votes
0 answers

dividing items into bins and retrieving the counts in each bin

I have a vector of continuous observations like so: x = c(0,0.001,0.03,0.8,0.005,0.6,0.12,0.3,0.75,0.9,0.043,0.81,0.5,0.21,0.27,0.17,1,0.9) I divide it to twenty bins like so: cut(x, breaks=seq(0,1,by=0.05),include.lowest = TRUE) How do I retrieve…
N.M
  • 685
  • 1
  • 9
  • 22
0
votes
1 answer

Creating a histogram of edge image with concentric circles around one point [Matlab]

I have an edge image [gotten by applying canny edge detector]. On this I have a keypoint. I would like to get a histogram of the image with concentric (circular+radial) bins, similar to sectors in a CD or DVD, with the keypoint as the center. I am…
Sharath Chandra
  • 89
  • 1
  • 1
  • 9
0
votes
2 answers

Converting a list of events into a series of the number of events every two minutes

Two closely related posts are here and here. I haven't been able to translate either of these to my exact situation. Here is a vector of times: start.time = as.POSIXct("2013-06-20 01:00:00") x = start.time + runif(5, min = 0, max = 8*60) x =…
zkurtz
  • 3,230
  • 7
  • 28
  • 64
0
votes
0 answers

Relationship between bins in frequency vector and the frequency peaks

I would like to know if there is any general relationship between bins of frequencies and peak frequency: say a wave x=Asin(2*pi*w*t +phi), goes through fft and fftshift to get both the positive and negative frequencies (-w and w Hz), say the…
Amani Lama
  • 305
  • 7
  • 14
0
votes
2 answers

Separating data into bins and calculating averages

I have this sample data Time(s) Bacteria count 0.4 2 0.82 5 6.67 8 7.55 11 8.21 14 8.89 17 9.4 20 10.18 23 10.85 26 11.35 29 11.85 32 12.41 35 13.36 38 13.86 41 14.57 44 15.08 47 15.67 50 16.09 53 16.59 …
Blake43
  • 11
  • 1
  • 6
0
votes
2 answers

Adding a column containing hist bins to a data frame

I am new to R and am struggling to create assign a set of bins to a data frame that contains a set of numbers. Such as: value 21 53 1 43 56 If I run hist then I know I can assign these values to a bin but that gives me a graphical output. How do I…
-1
votes
1 answer

Getting this error while binning for plot: TypeError: '<' not supported between instances of 'int' and 'str'

bins=[-30, 0, 30, 60, 90, 120] group_names =["-30 to 0", "0 to 30", "30 to 60", "60 to 90", "Over 100"] AccidentData_2021["Temperature(F)"]=pd.cut(AccidentData_2021["Temperature(F)"], bins, labels=group_names) AccidentData_2021 Expecting bar plot
Madina
  • 1
1 2 3
15
16