Questions tagged [histogram]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
15 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
1answer
46 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
1answer
70 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
1answer
47 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
1answer
41 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
1answer
56 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
1answer
73 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
1answer
62 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
2answers
56 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 ...
0
votes
0answers
44 views

Why is there strange $\cdot 10^4$ in this pgfplot?

Consider: \documentclass[article,oneside]{memoir} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[title = FOO, ybar, bar width=2pt, axis x line*=bottom, axis y line*...
1
vote
1answer
145 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
1answer
49 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
1answer
182 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
1answer
45 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
1answer
34 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
1answer
56 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
1answer
122 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
1answer
164 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
1answer
121 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
1answer
174 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
1answer
1k 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
1answer
466 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 ...
5
votes
1answer
232 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
2answers
570 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
1answer
307 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]...
1
vote
0answers
315 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
0answers
171 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
1answer
670 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
1answer
250 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
1answer
280 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
1answer
238 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
1answer
141 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
1answer
79 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
1answer
309 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
1answer
306 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
1answer
765 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
1answer
686 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
1answer
165 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, ...
1
vote
2answers
424 views

Plot horizontal histogram

I would want to plot a 2D horizontal histogram, with ybar interval, xlabel and x tick label rotate by 45 degrees. I would to put symbolic y coords and fill all white. How can I represent it? I've ...
2
votes
2answers
223 views

Pgfplots: xbar issues in histogram

I want to create an histogram with grouped bars of the same color and around evenly spaced (arbitrary) y-values. I managed to get this: Now, I want to put custom ytick labels in the center of each ...
0
votes
1answer
245 views

Interval missing and extrange behavior in frequency polygon

I am preparing a material for students about Statistics and I have this generic-foo frequency polygon as an example, without the corresponding Histogram. I would like all intervals to be displayed in ...
1
vote
1answer
885 views

How to make particular nodes near coords labels bold in a pgfplots bar chart?

A follow up question to my previous question: I am trying to plot a simple bar chart. The data is read and sorted from a csv file. However I couldn't able to change the style of particular labels (...
6
votes
1answer
991 views

How to make particular xticklabels bold in a pgfplots histogram?

I am trying to plot a simple histogram by using a code sample from pgfplots: \begin{tikzpicture} \begin{axis}[ xbar, xmin=0, width=12cm, height=3.5cm, ...
3
votes
1answer
234 views

Fitting Dataset Histogram (3 categories)

I am struggling with a Tikz figure. As you can se in the picture, there are three different Histograms, each for a specific Survey. The problem is that i can't fit the first and the second histogram ...
2
votes
1answer
457 views

Histogram Excel-like

I am a newbie with pgfplots so, after searching on internet and on pdf manuals, I am asking here. I need to reproduce with LaTeX some graphics like this one I made with Excel, can anyone help me with ...
3
votes
1answer
1k views

Histogram in LaTeX with random x axis values

I am trying to create a histogram in LaTeX for the following coordinates with random values (22,7041) (3,299) (4,299) (5,305) (6,64) (7,127) (8,469) (9,279) (10,237) (11,267) (12,257) (13,200) (14,...
3
votes
1answer
552 views

Plotting a line over 'histogram-like' bins

I have to convert the following JPEG image into a TeX-equivilant diagram using tikz and pgfplots. This is what I have sofar: \documentclass[border=3mm]{standalone} \usepackage{pgfplots} \begin{...
0
votes
1answer
2k views

PGFPLOTS: Drawing a Histogram with x ticks to the left

This is my histogram: \documentclass{article} \usepackage{pgfplots,tikz} \pgfplotsset{width=7cm,compat=1.13} \usepgfplotslibrary{statistics} \begin{document} \begin{tikzpicture} \begin{axis}[...
0
votes
1answer
462 views

Latex - placing and sizing histograms

I can fit several boxplots onto the same page (actually into the same picture) but can't get more than 2 histograms vertically, and only 1 horizontally. How do you resize histograms and set the number ...
2
votes
1answer
242 views

Drawing a histogram with boxes

I try to draw a histogram with boxes. Drawing histograms with pgfplots seems extremely simple, and I'm sure what I want to to isn't any more difficult, but I couldn't find a good example. Hence the ...