histogram

Smooth line on histograms in gnuplot

余生颓废 提交于 2020-01-05 04:38:10
问题 I want to make a smooth line over histograms. So far I have tried all the smooth functions but I am not able to get the result. For the histograms I am using: plot "file.scatter" u (hist($2,width)):(1.0) smooth freq w boxes notitle and the result is: But when I ask gnuplot to draw a smooth line over these: plot "file.scatter" u (hist($2,width)):(1.0) smooth freq w l notitle I get: I want the line plot to look smooth like a probability density function(of course the values will have to be

Histogram Matching in Renderscript

筅森魡賤 提交于 2020-01-05 03:09:14
问题 In order to align the intensity values of two grayscale Images (as a first step for further processing) I wrote a Java method that: converts the bitmaps of the two images into two int[] arrays containing the bitmap's intensities (I just take the red component here, since it's grayscale, i.e. r=g=b ). public static int[] bmpToData(Bitmap bmp){ int width = bmp.getWidth(); int height = bmp.getHeight(); int anzpixel = width*height; int [] pixels = new int[anzpixel]; int [] data = new int[anzpixel

Pandas: multiple histograms of categorical data

不打扰是莪最后的温柔 提交于 2020-01-04 17:57:06
问题 I have the following dataframe: Type Cat1 Cat2 Cat3 0 A 0.384000 0.393000 0.458000 1 B 0.603337 0.381470 0.299773 2 C 0.585797 0.452570 0.317607 3 D 0.324715 0.765212 0.717755 I want to produce three histograms, one for each "Cat". Each histogram must show the values for each "Type" (e.g., the categories) as x labels on the bottom histogram. I have been trying to do this using df.plot(kind='hist') but to no avail: ax=df.plot(kind='hist',subplots=True,layout=(3,1),title='My title',color=

Generating smoothed randoms that follow a distribution

喜欢而已 提交于 2020-01-04 09:48:32
问题 I have two variables, lets call them x and y , which when plotted are the scattered blue points in the graph. I have fitted them using curve_fit from Scipy . I want to generate (lets say 500000) "smoothed" random numbers replicating the distribution followed by x and y . By "smoothed" I mean, I don't want randoms that exactly replicate my data ( x and y ) like in the figure below , with the red diamonds being my data distribution and the histogram being my generated randoms. ( even the

How to color only one of the labels of a histogram in R?

走远了吗. 提交于 2020-01-04 09:10:23
问题 I have a data frame like this: CellLines ZEB1 600MPE 2.8186 AU565 2.783 BT20 2.7817 BT474 2.6433 BT483 2.4994 BT549 3.035 CAMA1 2.718 DU4475 2.8005 HBL100 2.6745 HCC38 3.2884 HCC70 2.597 HCC202 2.8557 HCC1007 2.7794 HCC1008 2.4513 HCC1143 2.8159 HCC1187 2.6372 HCC1428 2.7327 HCC1500 2.7564 HCC1569 2.8093 I could draw a histogram and add labels to that (thanks to the guys here for their help with this "Make a histogram clearer by assigning names to different segments of each bar in R"). I was

How to create a histogram with varying bin widths

一世执手 提交于 2020-01-04 02:47:07
问题 I have been unsuccessful with other using hist plot. A simple problem would be using the following data: age range - frequency - central band width - bin width - height (respectively) 1-4 - 30 - 2.5 - 3 - 10 5-6 - 20 - 5.5 - 1 - 20 7-17 - 30 - 12 - 10 - 3 With age along the X axis, with a linear scale, so the bin width for 1-4 would be 3, with height 10, bin width for 5-6 would be 1 with height of 20, and 7-17 would be 10 and the height would be 3. How would can I place these data into a Word

Is it Possible to Use Histogram Facet or Its Curl Response in Kibana

无人久伴 提交于 2020-01-03 18:57:33
问题 Is it possible to use a manually created histogram facet (or the results of its curl request) like this one in a Kibana dashboard: { "query" : { "match_all" : {} }, "facets" : { "histo1" : { "histogram" : { "key_script" : "doc['date'].date.minuteOfHour * factor1", "value_script" : "doc['num1'].value + factor2", "params" : { "factor1" : 2, "factor2" : 3 } } } } } Thanks 回答1: It looks like it will be supported in Kibana4, but there doesn't seem to be much more info out there than that. For

matplotlib scatter_hist with stepfilled histtype in histogram

坚强是说给别人听的谎言 提交于 2020-01-03 08:54:34
问题 I modified scatter_hist.py example found here to have two data sets to be plotted. I'd like to have histograms with "stepfilled" type, but somehow if I set the type "stepfilled" the Y-axis histogram (orientation = "horizontal") is not working. Is there any other way to do the histogram to look like "stepfilled"-style or am I doing something wrong? Here is my code with histtype = "bar" to show the idea what I try to do. Change it to histtype="stepfilled" to get strange histogram: import numpy

BOW prediction of cluster for training data

六眼飞鱼酱① 提交于 2020-01-03 03:28:24
问题 I am creating a bag of visual words for classification of videos. I am not using SURF descriptors and that is why I couldn't use OpenCV's BOWImgDescriptorExtractor for this purpose. I extracted my descriptors and I cluster them by myself. I have my vocabulary now (of size 4000). what I should do is to assign my training descriptors to these cluster and create visual histogram for next steps. how should I do this prediction and create visual histogram for my training data from the created

Multi-Channel Back Projection Assertion (j < nimages)

泪湿孤枕 提交于 2020-01-03 03:15:27
问题 Attempting to do histogram back-projection on a three-channel image results in the following error: OpenCV Error: Assertion failed (j < nimages) in histPrepareImages, file ../modules/imgproc/src/histogram.cpp, line 148 The code which fails: cv::Mat _refImage; //contains reference image of type CV_8UC3 cv::Mat output; //contains image data of type CV_8UC3 int histSize[] = {16, 16, 16}; int channels[] = {0, 1, 2}; const float hRange[] = {0.f, 256.f}; const float* ranges[] = {hRange, hRange,