Questions tagged [histogram]
The histogram tag has no usage guidance.
74
questions
0
votes
0
answers
25
views
3D stacked bar histogram with pgfplots
I would like to plot a 3D stacked histogram like this (generated with Excel) with pgfplots:
The data are as follows:
Category Val1 Val2 Val3 Val4 Val5
Cat1 20 23 13 ...
1
vote
1
answer
103
views
How to make histogram using tikzpicture of lot of data?
This problem is making me crazy, I have been sitting all day trying everything I can figure out without any useful results. I have a csv file like this:
3001, 3001, 15001, 7206, 7217, 7617, 15001, ...
1
vote
1
answer
61
views
Creating a probability histogram with TikZ
I'm trying to create a probability histogram, and this is its current status
\documentclass[oneside,english]{amsart}
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\...
1
vote
2
answers
252
views
How to change bin width of a histogram
I'm attempting to draw a histogram of 8 bins of width 10. This is what I currently have, where my bin width is notably much less than 10 units.
\begin{tikzpicture}
\begin{axis} [ybar,xmin=...
0
votes
1
answer
70
views
Adding number of data within the interval in a histogram
I have a set of random data. I could easily make a histogram in Mathematica as
Then I tried to replot this histogram in latex using the pgfplots package. But I only got
The important thing that was ...
0
votes
1
answer
326
views
Making a frequency distribution using intervals
I am trying to get help with a statistics problem. It is not advanced by any means and I know very well how to solve it. I just happened to stumble across LaTeX and got interested in learning how to ...
1
vote
1
answer
44
views
pgfplots horizontal histogram problem hide nodes near coordinates
I'm trying to draw a horizontal histogram, but I struggle to hide the last two nodes near the coordinates.
I want the y-axis showing a tick also at >1000.0ms, but I don't want ot show a value for ...
2
votes
1
answer
309
views
Create a pgfplots chart with two histograms in same plot
Is it possible to create a plot with pgfplots with the histogram of two variables in the same chart, with a different color each?
This an example code I am using, but it creates a histogram where bars ...
2
votes
0
answers
24
views
Why pgfplots's histogram vertical axis magnitude in %? [duplicate]
According to example from manual for pgfplots (page 512), the default behaviour of hist={density} is a plot
My MWE result y-axis magnitude realize in % (not in per-one). Why?
\documentclass{article}
\...
0
votes
1
answer
68
views
How to break a line in text caption with Tikz package [duplicate]
I’m currently designing a chart using the following LaTeX structure:
\begin{center}
\begin{tikzpicture}
\draw (0,0) grid[xstep=20,ystep=1] (10.8,6);
\draw [line width=6mm, color=blue!50] plot [ycomb] ...
1
vote
1
answer
207
views
How to create a histogram with intervalls and symbols with pgfplots?
I am trying to recreate a histogram with pgfplots in TeX that i have orignaly created with Excel:
The problem that i have is that i don't know how to recreate the x-axis with pgfplots. So far I have ...
1
vote
1
answer
109
views
Aligning ticks with histogram intervals
I am trying to get the histogram intervals to show up in the graph and for them to line up with the bars but i'm not sure where i am going wrong.
This is my code so far:
\documentclass[12pt]{article}
...
1
vote
2
answers
367
views
histogram ticks alignment
I'm trying to create a histogram in latex but the ticks are not aligning with the bars and i'm not sure why.
this is what i have so far:
\documentclass[12pt]{article}
\usepackage{fancyhdr}
\...
1
vote
1
answer
195
views
Add vertical line to a pgfplots histogram
How do I add a vertical line between the bars in a histogram?
The following constructs my diagram:
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[...
0
votes
1
answer
1k
views
Creating histogram using pgfplot and tikz
I am creating histogram graphs using pgfplots and tikz. I have used tikz for other figures, but never a graph.
The code I am running is:
\documentclass[oneside,12pt,openany,fleqn]{article}
\...
0
votes
1
answer
104
views
Drawing histogram on a ruled graph sheet. Help me with this
I would like to draw this histogram (see the attached image) on a ruled graph sheet. So far, I have the MWE as follows:
\documentclass[tikz,border=2mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{...
1
vote
1
answer
427
views
Histogram: increasing space between bars
How can I maintain the same width of the bars, and at the same time increasing the space that separates them?
\documentclass{article}
\usepackage{pgfplots}
\usepackage{tikz}
\begin{document}
\...
1
vote
1
answer
104
views
pgfplots: line sharp plot histogram - value is missing and values too much
I have values
1 2 2 3 3 4 4 4 4 5 5 5 6 6
and want that to plot as a line sharp plot histogram.
So, I set:
hist={
handler/.style={sharp plot},
intervals=false,
},
But he does not want to show the 2 ...
2
votes
1
answer
92
views
Histogram with multiple plots of same data
I am trying to create a histogram with an x-axis showing a range. I want the x-axis to be labelled with the data IL2, IL3 and IL4. There are 4 points plotted at IL3 and I want them to appear as ...
1
vote
1
answer
647
views
Percentage column labels in pgfplots bar chart
I'm working to a bar chart with datas values between 0 and 1 representing percentages like this:
\documentclass[border=3mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\begin{...
2
votes
1
answer
245
views
Insert indications on the histogram bars with tikz
I would like to insert some indications on the histogram bars. The only thing I've done so far is to add some labels. But the desired result looks more like the following figure:
My code:
\...
0
votes
2
answers
234
views
Problem in creating a histogram having number of occurrence the top of each bar
I have a data file. I want to plot a histogram from this data file with the number of occurrences on top of each bar. I could prove such a plot in Mathematica and the result is
But I couldn't ...
1
vote
1
answer
403
views
How to individually customise tick marks and labels in histogram
I need to mark three x values in a histogram. I thought a way would be introducing extra x ticks and customising major tick length and thickness so they show up more conspicuously. Is it possible to ...
0
votes
1
answer
86
views
Simple Histogram With Shading and Standard Units
I am trying to reproduce the following type of histogram. One where I can apply "shading" of a region and standard units. Any help would be greatly appreciated.
2
votes
1
answer
682
views
how to plot a 3D histogram with one of the axis showing nominal variable
I would like to plot a 3D histogram with x and y=continuous variable and z=categorical(nominal) variable. I tried to show the information in a superimposed arrangement but I think it looks very messy ...
1
vote
1
answer
324
views
problems with histogram labels and legend
I am having problems adding labels aligned to axis x and y. When I implement xlabel/ylable in the code they do not show. Furthermore, I would like the legend font to be smaller and the command \...
1
vote
1
answer
64
views
Histogram with small numbers shows just a line
I want to implement a histogram. My code worked for the time I've used numbers between 0 and 10, but with my new numbers it just shows me a line and no histogramm.
Can someone give me advice to fix ...
1
vote
1
answer
114
views
Drawing an histogram of the repartition of a data set
I have a dataset of marks (0 to 20), for example a [2, 3, 7, 14, 15, ...]
I would like to draw an histogram of the repartition of this dataset. What I mean is an histogram where on the x-axis are ...
4
votes
1
answer
207
views
How to make a histogram as ratio of two columns
I have this code:
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{data.txt}
cola colb
+5.96596689e-01 +5.68950232e-01
+7.81573637e-01 +8.05102869e-01
+2.84382101e+00 +2....
0
votes
1
answer
370
views
Matlab histogram converted to Latex makes blurry image
I´am trying to import a matlab histogram to latex. So I generated the plot and saved it with print -depsc MyPicture.
Afterwards I loaded the .eps File with
\includegraphics[width=.8\textwidth, ...
0
votes
1
answer
247
views
Custom Histogram in Tikz
I am trying to create the picture below in Tikz. What I am most unsure of is how to make the histogram below. It does not need to have the exact same shape, but a similar shape to the histogram below. ...
6
votes
1
answer
399
views
Drawing histogram: color depending on percentage
I would love to color each bar according to its percentage. Is there a way to do this? Or give it like a very sharp color/style. Any ideas are welcomed!!!
This is what my actual code yields:
\...
5
votes
1
answer
2k
views
3D Histogram / bar chart
Hello fellows and folks!
I wanted to know if it is possible to plot a 3D histogram like these:
The file is a .csv one with 100K rows/tuples. My idea is to plot users (x-axis), movies(y-axis) and ...
4
votes
1
answer
555
views
How to make this bar graph look nicer?
I have three questions about my latex code.
1. How can I make the line that says "I want this line to be on the leftmost side, but it is currently not after compilation." be printed at the leftmost ...
6
votes
1
answer
430
views
How to generate a customised histogram with pgf plots?
I am trying to generate a histogram like the following:
While going through the examples pgf plots, I was able to generate a histogram similar to the following:
using the code from the example link ...
1
vote
2
answers
1k
views
How to create a relative frequency histogram [duplicate]
I am trying to create a normalized frequency histogram. A minimal working example is adapted from this TexStackExchange answer by @Jake (see code below). I know I can switch add density to hist={} but ...
3
votes
1
answer
637
views
Histogram in pgfplots: Count the total number of data values
I'd like to make a histogram with pgfplots showing percentages on the y-axis instead of the number of points falling into the bins, like so (the example is taken from the manual):
\documentclass[11pt]...
2
votes
0
answers
758
views
pgfplots Histogram with Curves [closed]
Variations on this question have been asked many times before, but I have not been able to find a working solution. The closest I have seen are discussions on other stackexchanges concerning how to ...
1
vote
0
answers
274
views
pgfplots Histogram with Automatically Calculated Percentage Bins
I have a CSV file. The CSV file contains several columns.
I want to plot a histogram that displays:
As the x axis: bins for the percentage of rows, that can be changed;
As the y axis: the cell ...
1
vote
1
answer
1k
views
pgfplots Line Histogram
I have a histogram. It is created from data in a CSV file.
I would like to connect the mid points on each bar with a smooth line.
My intention is to plot multiple series and show just the lines.
...
1
vote
1
answer
449
views
pgfplots Histogram with Normal Curve
Variations on this question have been asked multiple times before, but I have been unsuccessful in getting them to work. I may be (and most likely am) just inept at statistics.
I wish to plot a ...
2
votes
1
answer
573
views
Tikz | How to change line color of histogram
I am trying to follow this answer for drawing a historgram. I was able to change the fill color of the histogram but I was not able to change the line color of the bars.
Question: What do I have to ...
1
vote
1
answer
444
views
Combine boxplot and histogram in one diagram (PGF/TikZ)
For my bachelor thesis I did a questionnaire, now I want to evaluate and visualise it in a diagram, combining multiple values. Most of the answers from this survey are in a scale of 1-5 or 1-6. I want ...
1
vote
1
answer
269
views
Histogram with Markers, Marker Nodes and Legend Not Displaying Everything Correctly
I am still kinda new to TEX. I am currently working on a paper submission, however I am having trouble properly combining markers, node labels for the markers, a legend and a histogram all in the same ...
2
votes
1
answer
185
views
Tikz bar plot Issues: The histogram is not scaling properly
I am having trouble with my tikz plot, Even the value is 21508 corresponding to drive, it is evident from the figure that histogram is not scaled properly. I do not know why this is happening.
My ...
1
vote
1
answer
738
views
How to plot histogram from a tab separated csv file containing tabular list of ordered tuples?
I would like to plot a histogram in which x-axis will contains ordered tuple data and y-axis will contains its frequencies. A CSV file containing data as follows :
x_values y_frequency
(2,102,100)...
2
votes
1
answer
404
views
How to properly draw a histogram?
Surely it is an easy problem but I can't find a solution. Imagine you want to simulate a Gaussian distribution of frequencies around a mean value with a certain spread. It is an easy task to write the ...
1
vote
1
answer
1k
views
How to get this simple histogram?
I want to create this:
But I've come up with this one:
I've searched the internet first but the histograms they were plotting were so much complicated.
\begin{tikzpicture}
\begin{axis}[
symbolic ...
0
votes
1
answer
926
views
Two eps sub-figures with one legend
I have two figures and I want to have them as two-subfigures with one legend, and separate numbers with commas on the y-axis (like 10,000 or 1,000,000).
This is what I currently have:
I tried to use ...
1
vote
1
answer
302
views
Adding a Legend to a Histogram
I created the following histogram but all labels were messed up.
\documentclass{standalone}
\usepackage[T1]{fontenc}
\usepackage{pgfplots}
\pgfplotsset{
compat=newest,
xlabel near ticks,
...