style - Histogram with the smaller bar in front

I am trying to visualise multiple data sets in one histogram. When using one or two datasets, the automatic transparency of the bars keeps everything relatively easy to see. When going to three or more datasets however, quickly the colours become confusing and unclear, in particular when there is much = {RandomVariate[NormalDistribution[2, 2], 200], RandomVariate[NormalDistribution[6, 2], 200], RandomVariate[NormalDistribution[4, 3], 200]};Histogram[data, ChartStyle -> {Blue, Green, Red}]Instead of the transparency and the...Read more

Histogram range of bins

Mathematica misrepresents data with Histogram by choosing "arbitrary" range in its bins.For example the command:Histogram[Table[RandomReal[], {100000}]]Gives the expected picture:However, the command:Histogram[Table[1.005 RandomReal[], {100000}]]Gives the following:As you can see the last bar is much shorter than the rest. This clearly happens because Mathematica rounds up severely the range of the values and the last bins falls mostly out of the range. Can Mathematica be convinced not to do that?...Read more

Creating a histogram using custom data

Let's consider the following simple data setdata = {{0,1.48},{1,0},{2.3,6.22},{3.1,0.01},{3.45,2.66},{5.34,0.11}, {7.98,3.18},{8.12,4.11},{8.32,0},{9.65,3.56},{10,5.22}};The list contains pairs $(x,y)$. I want to use this data for creating a histogram where the $x$ values are the horizontal values of the histogram, while the corresponding $y$ values indicate the height of the respective bar of the histogram. I also should be able to control the width of the bars, let's say to be equal to 0.001.Any suggestions on how to create the desired...Read more

Creating a histogram of the number of edges in a digraph

I have the following Code which calculates the number of edges in a range theta1 and theta2. As seen from this Manipulate, one can arbitrarily choose a lower and upper bound for mm and simply see the associated digraph as well as the total number of edges in it. Basically, this is a histogram of edges, but a very disaggragted one. Clear[mm, vLabels, selectBetween, subgraphBetween];mm = RandomReal[0.5, {10, 10}];vLabels = {1 -> AGR, 2 -> FIS, 3 -> CO1, 4 -> CO2, 5 -> MA1, 6 -> MA2,7 -> EGW, 8 -> CST, 9 -> WHS, 10 ->...Read more

histograms - AxesLabel in Histogram3D unreadable

I'd like to modify this chart to relocate the z axis label so it's not over printing the values. data = RandomReal[{0, 100}, {100, 2}];Histogram3D[data, 20, "ProbabilityDensity", AxesLabel -> {Style["Mean Rate (tph)", "Text"], Style["Duration (minutes)", "Text"], Style["Probability Density", "Text"]}, ImageSize -> Large, PlotLabel -> Style["Concentrator Run Duration and Mean Rate", 18], ChartStyle -> TSGblue, ViewPoint -> {Pi, Pi, 2}]I can rotate the label but the values are still over printed....Read more

Creating histogram?

How can i create histogram of these variables that would show the depth of sensors when temperature is 0 Degree Celsius. Time function is 0 min, 50 min, 100 min, 150 min, 200 min, and 250 min and depth of sensors in ground is 10cm, 20cm, 30cm, 40cm, and 50cm. The first number indicates the running time in minutes, followed by a 5 sensors temperature readings, first is in 10cm depth and last in 50cmMydata= {{0, -0.65625`, 0.4375`, 0.625`, 0.75`, 1.6875`},{50, -0.71875`, 0.4375`, 0.5`, 0.8125`, 1.5`},{150, -0.78125`, 0.34375`, 0.5625`, 0.8125`, 1...Read more

What happened with good old Histogram?

For the sake of demonstration in a class I wanted to use the line:Histogram[Accumulate[RandomReal[{-1, 1}, 100000]], {1}, "Probability"]to get a probability-like distribution of the random walk process. This worked for me on Mma7, 8, and 9 returning a reasonable probability-like histogram. As soon as I do it now (Mma 10.0.2, Win7) I get for several times the desired histogram. However, after several (about 10) trials I suddenly see the word "Histogram" appearing in red color, and the whole thing stops working, with a message that Histogram is o...Read more

Histogram distribution

Imagine the following data:data = {-0.7, -0.5, -0.2, 0.1, 0.4, 0.5, 0.9, 1.1, 1.2, 1.3, 1.5, 2.1}From that I make a Histogram:Histogram[data, {1}]The output plot is:I would like another way of binning the data:The bins should be symmetric around the integer numbers:]-1.5,-0.5]: 2 counts]-0.5,+0.5]: 4 counts]+0.5,+1.5]: 5 counts]+1.5,+2.5]: 1 countAdded: It should work also for other bin width's:e.g. for bin width = 2 the intervals are ...]-3,-1], ]-1,+1], ]+1,+3], etc ...How can that be done? The number and tick marks should be centered below t...Read more

Histogram with divided bars

I have file with the flux as a function of time given as Modified Julian Day (MJD). Now I need to make a histogram of the all fluxes. I also need put into each bar information about times when given flux point occured. The main idea is to divide each bar into $n$ pieces ($n$ is the number of repetitions of a given flux value) and each piece should have a color depending on time (color bar). Is there any option to do this easily in Mathematica? I have tried StackedBarChart option, but with no results on this moment. Below is part of my code in M...Read more

histograms - How to get data from DB into dataset with keys

I'm a Mathematica newbie and I have the following problem: I connect to a Oracle DB and read out a set of variables, further on I want to histogram some of the variables. A Dataset seems to be the right tool, but I produce only datasets without a key via:DBtest = SQLSelect[db, "TABLE1", {"ID", "VAR_1"}]Dataset[DBtest]Result is a Dataset with one column containing ID and the other containing VAR_1 (sorry for the generic names - I can't copy my real work, since it contains sensitive data).Then I can't use the DBtest[Histogram, "key"] functionalit...Read more

histograms - Normalizing smoothhistogram curves

I'm looking for a way to get two smooth histogram curves to have the same max height. The plots are usually scaled by area or something, however, the only way I've been able to find that works is a really bad workaround. Anyone know of a better solution?Original SmoothHistogram:data = {RandomVariate[NormalDistribution[10, 2], 10000], RandomVariate[NormalDistribution[10, 0.7], 25000]^10/10^9};SmoothHistogram[data, PlotStyle -> {Blue, Red}]Bad Workaround:Show[SmoothHistogram[data[[1]], Automatic, "Intensity", PlotRange -> {{0, 100}, All},...Read more

Histogram[list] gives wrong image

I have generated a list of 100k numbers, and want to know their distribution. By looking at the numbers, the trend is very different from that generated by Histogram[], in log-log scale.Another problem is that if I don't use log scale, it gives me a blank plot. Really weird.bmax[θw_] := (1.14*10^9)/Sin[θw/2]^(9/7);db = 10^-5;Pb[θw_, b_] := (2 b db)/bmax[θw]^2; a0[θw_, b_] := (9*10^10)/((2.51*10^63)/(Sin[θw/2]^7 b^7)-Sin[θw/2]^2);a0sim = {};n = 10^5;m = 0;While[m < n, {θw = π Random[]; b = bmax[θw] Random[]; I...Read more

Histogram from relative frequency data;

I've got a data set similar to the first and fourth column of this table where the first column is the midpoint of a fixed range of values (although a solution with arbitrarily spaced segments would be great) and the second column is the corresponding relative frequency of that initial range of values being present. A = {{5, 0.0123445}, {15, 0.0342565}, {25, 0.0885784}, {35, 0.184694}, {45, 0.243735}, {55, 0.223433}, {65, 0.111512}, {75, 0.000000}, {85, 0.000000}, {95, 0.1014466}}I want t...Read more

histograms - Datamining taking multiple variables

We have gotten a list of data that includes grades from random students between 0 and 20. Now we want to seperate them into groups from 0 to 5 and 6 to 10 etc and make a histogram out of that to see what the influence of those grades are on the final grade of each student. so far we got this:gradeAndG1 = Transpose[{G3,G1}];gradeAndG10 = Select[gradeAndG1 ,Last[#] == 0 &];gradeAndG11 = Select[gradeAndG1 ,Last[#] == 1 &];gradeAndG12 = Select[gradeAndG1 ,Last[#] == 2 &];gradeAndG13 = Select[gradeAndG1 ,Last[#] == 3 &];gradeAndG14 =...Read more