Skip to main content

Questions tagged [bar-chart]

{bar-chart} is about creating bar charts using TeX/LaTeX/etc.

Filter by
Sorted by
Tagged with
1 vote
1 answer
45 views

custom label for significance (*) with its value in brackets

I need customized node near coords in such a way that the level of significance (*) with it value is shown in brackets. I tried for level of significance and its value in brackets that all went in ...
Ahmed Aafaq's user avatar
1 vote
1 answer
60 views

Decimal rounding in tikzpicture

I have the following problem. I have this code that creates a split bar chart for each day. Now I want to plot you numbers over it. Also with a decimal place, even if it is a whole number. ...
latzo2's user avatar
  • 11
1 vote
1 answer
27 views

Horizontal Bar chart: cut off top and bottom bars

I have the problem, that somehow the bars at the top and bottom are cut off when compiling them. The red one above with 421 and the blue one below which is 0 are not visible. I am quite new to latex, ...
developBeginner's user avatar
1 vote
1 answer
43 views

PGFplots: Remove empty bars from barplot with multiple series

Currently working on a barplot, where I have 6 series of bars to be plotted, with 4 discrete x-values. The issue I am now running into is that, as you can see below, for example for value4 there is ...
Ludger's user avatar
  • 13
0 votes
1 answer
38 views

Adding space between horizontal axis and horizontal bar bars

I am working on a simple bar chart, and I haven't been able to figure out how to add an extra space between the horizontal axis on top and the first horizontal graph ("Mines"). I would ...
Fernando's user avatar
  • 103
1 vote
0 answers
28 views

How to adjust poition of a grouped bar in a stacked barplot?

I have made a grouped barplot. There is one condition in my data that only requires a single ungrouped bar. Here is the code I have used: \documentclass{standalone} \usepackage{pgfplots} \usepackage{...
Miloop's user avatar
  • 1,024
0 votes
1 answer
37 views

Clickable labels to the left of bars in chart

I would like to alter the bar chart given in section TEST1. In section TEST2, instead of having simple textual labels, I would like clickable links (with a shortened version of the URL as the text, ...
Thure Dührsen's user avatar
0 votes
1 answer
137 views

how to draw this bar chart in latex?

I am trying to replicate a plot like this one in latex. I wonder if anyone has some good example codes to share? many thanks,
Vincent's user avatar
  • 137
1 vote
1 answer
46 views

Visualization of positiv or negativ ratings

I want to do a visualization of "bad" or "good" for some parameters. It should look like this: But I have no idea on how to get those colored boxes or the format in general. Do ...
Fabian Erhart's user avatar
0 votes
1 answer
40 views

Adding Labels to Specific Bars in a Histogram

the code i currently have generates this graph: \documentclass[11pt]{article} \usepackage[review]{ACL2023} \usepackage{times} \usepackage{latexsym} \usepackage{forest} \usepackage{array} \...
Maya's user avatar
  • 11
0 votes
1 answer
53 views

Putting labels below each bar in TikzPicture

I'm trying to create a graph like this: But I can only get it to look like this using legend text, but I want to put the text directly below the bar graphs (like 0ms, 50ms, 150ms) My code: \...
Erik's user avatar
  • 13
2 votes
1 answer
96 views

Complex bar chart with data tags

I want to create a chart similar to this one that I found online 1. I have no idea if this is even possible using simple tools like tikZ and pgfplots, or if it would be recommanded to simply drop this ...
stuck's user avatar
  • 135
0 votes
1 answer
72 views

Missing labels in barchart

I'm trying to draw a barchart but the text that I underlined and colored as green doesn't seem to display. This is how it appears. The following is the code. \documentclass{article} \usepackage{...
Yevin Christopher's user avatar
0 votes
1 answer
146 views

How can I create a stacked bar graph for a 5-scale Likert chart for every row in a table?

I want to create a table to represent the response from a survey as 5-scale Likert chart for every question. The table should like as follows. [
MD. Shazibul Islam Shamim's user avatar
0 votes
2 answers
84 views

Bar chart with multicolored bars and labels

I would like to create a bar chart with a multicolored bar. The bar chart should show the length of each section. My problem is that in the first section the number always goes before the bar chart ...
Lucas's user avatar
  • 13
1 vote
1 answer
50 views

No space between bars, symbolic x, multiple plots

I want to typeset a ybar chart with (maybe) several plots, symbolic x coordinates and a specified width so that bars have no space between them and also do not overlap. Each bar should have a node ...
ysalmon's user avatar
  • 1,274
2 votes
2 answers
61 views

How to change base value on x-achsis in a Tornado plot?

I am trying to do a tornado plot where the base value on the x-axis is different from zero, in my case 5.43. \documentclass[margin=5pt]{standalone} \usepackage{tikz,pgfplots,pgfplotstable} \...
Fantastic MsFox's user avatar
1 vote
1 answer
73 views

How to make to fix the x-axis interval of this bar graph and make it look like the following graph?

Here is the bar graph I'm trying to copy (not numbers just the graph), And here's my attempt, And here is the code, \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{...
Abdulrahman's user avatar
3 votes
2 answers
112 views

How to generate a subtotal in a bar chart (pgf tikz)

I want to generate a bar chart like this one with subtotals (here in diamond shape): I tried to work around a subtotal using a second axis, but the datapoints are not in the middle of the respective ...
Fantastic MsFox's user avatar
1 vote
1 answer
67 views

Shifted stacked ybar plot

When using a stacked ybar plot, each stacked column begins at y=0 . I would like to vertically shift the stacked column of Data B, so that its lower end aligns horizontally with the upper end of the ...
Matthias's user avatar
1 vote
2 answers
76 views

How to add color and legends to bar chart

I am trying to create a simple chart using the code below: \begin{tikzpicture} \begin{axis}[ symbolic x coords={ Integrated Circuits, Transistors, Capacitors, ...
DEKKER's user avatar
  • 117
0 votes
1 answer
45 views

How to set max of y axis on bar chart

I tried many solutions which were about similar question, but nothing helped... I have a bar chart in Latex, which contains values from 2 550 to 18 016. I want to have numbers on y axis: 0, 5 000, 10 ...
Michaela Hanková's user avatar
0 votes
1 answer
46 views

How to write above specific bars in bar graphs using pgfplots?

I would like to put values above a few bars in my bar graph. For those bars whose value exceeds 1.7, I clip off the bar at 1.7 and write its actual value on top of that bar. Here is what I have (for ...
Programmer's user avatar
0 votes
1 answer
176 views

Different bar widths in pgfplots stacked bar chart

Below is a simple example of a stacked bar chart from the pgfplots manual. In my case, the y axis represent percentages, and the percentages in all columns add up to 100 (so like in this example, all ...
user65560's user avatar
  • 5,545
1 vote
1 answer
147 views

Tikz bar chart, nodes near coords, remove value from a specific bar

I am using pgfplots to display a stacked bar chart. For each x-value, two bars are stacked. I need to show the y-value inside each bar and their sum on top. I managed to achieve this, however, the ...
Ronteg's user avatar
  • 13
1 vote
1 answer
70 views

Bar Chart offsets with multiple plots

I want to create some histograms and need to represent a few bar charts. However, I am facing two issues with this MWE: \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{...
lurgold's user avatar
  • 13
0 votes
1 answer
48 views

Repeating axis labels in bar chart

Using the following latex: \begin{figure}[htbp] \centering \begin{tikzpicture} \begin{axis} [ ybar, nodes near coords, bar width=0.4cm, symbolic x coords={2--3 times a week, 4--6 times ...
Boris Winter's user avatar
0 votes
0 answers
30 views

Merge 3 bar plots [duplicate]

I would like to merge 3 bar plots \begin{figure} \centering \begin{tikzpicture} \begin{axis} [ ybar, ...
Lorenzo Epifani's user avatar
2 votes
0 answers
32 views

Aligning Y-Axis Labels with Bar Charts using PGFPlots

I have been struggling with the following piece of code for a little while now, and I am about to give up! Hopefully someone can assist so I can show multiple bar charts in one figure. \begin{figure}[...
Wout's user avatar
  • 21
1 vote
2 answers
135 views

Drawing a bar chat (horizontal) or log line chart

I am trying to draw this graph, one is linear another is exponential and proportional to the size of the data. The numbers are so different from each other, I don't know how to make it more ...
Node.JS's user avatar
  • 685
1 vote
0 answers
61 views

Automatic calculation of error bars based on data in a bar chart

I would like to draw a bar chart using PGFPlots with error bars that are automatically calculated from the data. Here is a slightly simplified version of what I am attempting: Suppose you have two ...
bp99's user avatar
  • 617
1 vote
1 answer
247 views

Need Help with Aligning Labels Below Each Bar in TikZ Bar Chart

I am struggling with moving the labels {1, …, 6} in my bar chart. I would like to locate each label precisely at the center below each respective bar but I'm not sure how to do this. Here is the code ...
cricket900's user avatar
1 vote
1 answer
391 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, ...
J. Doe's user avatar
  • 113
2 votes
1 answer
78 views

Outlining the numbers at the nodes near coords

Is it possible to outline the white numbers with black? The white numbers lie inside the blue columns \documentclass[border=5pt]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.9} \begin{...
UnknownW's user avatar
  • 399
1 vote
1 answer
65 views

Bars not properly displaying in TIKZ

I have run into this Issue where I try to have 2 Barcharts next to each other, but for some reason the second one is really weirdly positioned and stretched. I have similar charts with the same code, ...
Rafael Pietsch's user avatar
1 vote
1 answer
152 views

How to make coordinate value bold?

I am tyring to make this value (16.49) bold in the bar graph. I can't seem to find any answer. \begin{figure}[ht] \label{fig:table} \begin{tikzpicture} \begin{axis}[ %axis line style={draw=none}, ...
user2661372's user avatar
2 votes
2 answers
73 views

How to draw a patch inside a bar to indicate hours in a day?

Problem I would like to indicate the time duration of an event as a colored patch inside a horizontal bar, the latest representing a 24-hour timeline (i.e. a 24 units long bar), that should help the ...
Ommo's user avatar
  • 947
2 votes
1 answer
72 views

How to integrate three stacked bar charts in one figure? [duplicate]

I have a latex code for bar chart with a legend. I'm trying to add two more similar charts on the side to have 3 bar charts side by side with each chart having a sub-caption and the final figure ...
Student's user avatar
  • 307
0 votes
1 answer
36 views

Descriptive nodes for certain shifted bars in bar plot

In the example below, I want a label node for each of the bars in the middle grouping. How can I get the labels to shift to right place the same way the bars are? \documentclass[margin=5pt]{standalone}...
bongbang's user avatar
  • 417
1 vote
1 answer
54 views

Is there any simple way to change my bar graph alignment and increase its width on LaTeX?

So I'm pretty new to using LaTeX. I created this bar graph, but it's too wide to fit in my PDF doc. I don't want to rotate the graph. I also need this graph to be aligned to the flush left margin of ...
Aki Vivek's user avatar
2 votes
1 answer
117 views

pgfplots (xbar stacked): Small percentage values are getting overlapped

Problem: I want the the small values (<10% such as 10%, 7% and 6%) for N=12 and N=6 in the (a) and (b) bar-charts to be properly visible and not get overlapped with each other. I tried to change ...
Student's user avatar
  • 307
0 votes
1 answer
43 views

Bar chart values are overlapped, slice is very small to show these values

\documentclass{article} \usepackage{pgfplotstable} \pgfplotsset{compat=newest} \usetikzlibrary{patterns} \begin{document} \caption{Existing Scenario: Mode Wise Percentage Share} \centering \begin{...
Muhammad Habib's user avatar
0 votes
1 answer
68 views

The ytick labels are too small and they need to be in multiple lines

Problem: I am trying to align the ytick labels in two lines as the labels look small for the figures. To reiterate, as shown from the below figure, I want N=3 in one line and add the number in square ...
Student's user avatar
  • 307
0 votes
1 answer
59 views

Y-axis labels in the bar chart should be different

I want to have three different Y-axes labels for the three bar-charts shown below. To reiterate, the labels should be N=3,N=6,N=12,N=24,N=48 for the bar-chart (a) MADDPG and N=1,N=10,N=20,N=30,N=50 ...
Student's user avatar
  • 307
0 votes
1 answer
33 views

X-axis hides behind the bars

In the following bar plot, the x-axis hides behind the bars. I need the x-axis to be view with the bars place behind it. \documentclass{standalone} \usepackage{pgfplots} \usetikzlibrary{decorations} \...
Ahmed Aafaq's user avatar
1 vote
1 answer
155 views

Small values in the stacked bar-chart are not visible properly

Problem: I want the the small values (5% and 6%) for N=48 in the (a) and (b) bar-charts to be properly visible and not on the grid. I tried to change the limits, increase the size but unfortunately ...
Student's user avatar
  • 307
2 votes
1 answer
106 views

Different color for single bars in a chart with multiple bars

I am currently trying to format my data in a bar chart. Here I want the bars for the first stage to be differently colored than the other ones in the same figure. I tried to achieve this using 4 ...
Krautsultan's user avatar
0 votes
1 answer
41 views

Can't add bar values to the bar, only xtick labels are showing

\documentclass{article} \usepackage{pgfplots, pgfplotstable} \pgfplotsset{compat=1.17} \usetikzlibrary{patterns} \begin{document} \begin{figure} \caption{Test Caption} \centering \begin{...
Muhammad Habib's user avatar
2 votes
3 answers
220 views

Last chart in a group of bar-charts should have two columns

I am trying to generate a group of bar charts with 3 figures and successfully completed that and the output can be seen below. Problem: I want the first two bar-charts (a and b) in the same state, but ...
Student's user avatar
  • 307
1 vote
1 answer
65 views

Y axis values are not being displayed for a bar chart

Problem: Y axis values are not being displayed on the bar chart. Output: Latex code: \documentclass[border=5pt]{standalone} \usepackage{pgfplots, pgfplotstable} \pgfplotsset{compat=1.18} \...
Student's user avatar
  • 307

1
2 3 4 5
13