Questions tagged [bar-chart]

about creating bar charts using TeX/LaTeX/etc.

Filter by
Sorted by
Tagged with
0 votes
0 answers
21 views

How to insert 4 bar chart figures in side by side in one line in ieee transaction format?

I want to plot four bar plots side by side in one line. Now I'm only getting two on the a4 sheet and the remaining 2 charts are not showing up. Also, can someone help with the alignment of legend? ...
user avatar
  • 1
0 votes
2 answers
32 views

How do I give space between the two bar charts

I want to plot two bar plots with more space next to each other (now the yaxis label overlaps on first figure). Also I want to add x axis label and a caption for each figure. Can anyone help me to ...
user avatar
0 votes
0 answers
18 views

Bar Charts out of JMH-Data

I want to do some bar charts out of a benchmark I've done with the Java Microbenchmarking Harness. The simple bar chart isnt the problem but on top of each of the bars, I want to show the variation (...
user avatar
  • 1
0 votes
1 answer
50 views

multiple bar in horizontal bar chart in latex

I am trying to show a performance comparison of the different machine learning models by multiple bars in a horizontal bar chart in latex. I have tried the following code: \begin{figure*}[!tbp] ...
user avatar
0 votes
1 answer
42 views

Misplacement of x in a bar chart with legend

I recently started using LaTeX for my bachelor thesis and I am unable to resolve the misplacement of the symbolic x coordinates. Also, I would like to have a consistent spacing between the different ...
user avatar
  • 11
1 vote
1 answer
34 views

Pgfplots bar plot

I am trying to display on horizontal bar plot numeric data however when i try to add string labels instead of numbers on y axis it do not work - What am I doing wrong? code \documentclass{minimal} \...
user avatar
2 votes
2 answers
117 views

Pgfplots: Creating a bar chart

The figure below is a survey result from google docs. I'm trying to create a similar bar chart using LaTeX (overleaf) but so far I haven't been able to get the same results. The output figure aboce ...
user avatar
  • 23
0 votes
0 answers
20 views

Adding point over grouped bars - Latex

I am trying to add a blue point over the grouped bars. There is a way to achieve this? This is my latex code: \documentclass{article} \usepackage{pgfplots} \usepackage{filecontents} \begin{...
user avatar
0 votes
1 answer
33 views

Bar chart drawing: lines getting mixed up and overlapping

I am trying to follow this example](https://tex.stackexchange.com/a/157028/122628) to draw a basic bar chart but the lines are getting mixed up. I think it's because major differences between the two ...
user avatar
  • 499
0 votes
1 answer
53 views

Grouped vertical bar chart from CSV

I have the following .csv file, percentages.csv: prefetcher,trace,ipc,ipc-per-diff gcc,ampm-lite,0.339157,0.164172 gcc,ghb-pc-dc,0.306047,0.050520 gcc,ip-stride,0.308053,0.057406 gcc,next-line,0....
user avatar
  • 488
0 votes
1 answer
31 views

Insert bar in a plot and plot setting

I want to plot data like the following diagram with the bars as shown on the right side: The current state of my code is: \documentclass{article} \usepackage{pgfplots} \usepackage{tikz} \begin{...
user avatar
  • 35
0 votes
1 answer
73 views

Bar graph with tikzpicture

I have this bar chart, but I can't see all the labels in the x axis. What am I missing? Also, entropy bar is not in the right place. Thank you. \begin{figure}[h!] \begin{tikzpicture} \small \begin{...
user avatar
1 vote
1 answer
66 views

pgfplots nodes near coords with error bar

I am working on a horizontal bar plot with error bars. In addition I'd like to place the actual value of each bar with nodes near coords in the plot. However they tend to overlap with the positive ...
user avatar
0 votes
1 answer
72 views

Plot a range bar chart [duplicate]

so I would like to plot a bar plot of the values indicated in the table, I just don't know how to do it. I have an optimal range that I would like to highlight (20-30) and show with bars which of the ...
user avatar
  • 19
1 vote
0 answers
11 views

Stacked and Grouped Bar Chart with pgfplots [duplicate]

I've been trying to create a stacked and grouped bar chart using the package pgfplots but I am struggling with it. Here is a minimal working example: \documentclass{article} \usepackage[utf8]{inputenc}...
user avatar
0 votes
1 answer
46 views

Change nodes near coords value to symbolic y value

I want to have label each bar of a horizontal bar chart with its corresponding y value. However, I am only able to get the numeric representation but not the actual symbolic value. \documentclass[...
user avatar
  • 247
0 votes
1 answer
29 views

How to add a margin for a y axis that uses symbolic y values

I want to create a horizontal bar graph using symbolic y labels. However I: want to have the bars next to each other (i.e., no space between) I want some margin below and above the first and last bar ...
user avatar
  • 247
0 votes
1 answer
33 views

Stacked bars first segment botched

I want to create normalized stacked bar graphs in my document. Somehow the first segment of the bar graphs gets botched, though. What causes this error? My Code \documentclass{standalone} \usepackage{...
user avatar
0 votes
0 answers
15 views

Y-Value Sorted Bar Chart with Z-Value Depending Width

I would like to create a bar chart from data points that sorts the bars according to their y-value and whose bar width depends on another z-value. The result is a so-called merit order. I could ...
user avatar
  • 13
2 votes
2 answers
55 views

pgfplots - decimal values for the bar plot

I need decimal values (they are in the code but in the plot. they are getting as integers) for the values above the bars. Also, the x-axis legend is overlapping so I need it in 2 lines. I mean each x ...
user avatar
0 votes
1 answer
67 views

Comparative bar graph using addplot

I am trying to sketch the following graph. Using addplot, I have managed to draw the following. What I am having trouble with is drawing two bars for one agegroup. This must involve reducing the ...
user avatar
  • 1,904
0 votes
0 answers
52 views

Bar chart two axes

How can I get the two axes to meet correctly at the top right hand corner? I had to play with this line of code to get it nearly correct: \begin{axis}[legend style={at={(0.8,0.85)},anchor=north}, ...
user avatar
  • 163
3 votes
1 answer
69 views

pgfplots: Plot multiple xbar in same plot

I am trying to make a two bar plots together just like below, but with an xbar instead. However, this is proving to be harder than required for me. Here is my code: \documentclass{article} \...
user avatar
0 votes
0 answers
26 views

Is it possible to remove the ticks marks on the bottom and top of my bar graph? I don't like how they look outside [duplicate]

\begin{tikzpicture} \begin{axis}[ ybar, bar width=1cm, enlargelimits=0.2, legend style={at={(0.5,-0.2)}, anchor=north,legend columns=-1}, ylabel={Average Hardness Value [...
user avatar
0 votes
0 answers
38 views

Delete Nodes of Values smaller than 1000 in stacked bar chart [duplicate]

I would like to delete the labels of all the values, which are smaller than 1000, because they can't be seen correctly. I searched for a long time and I think there were some similar questions, but ...
user avatar
0 votes
2 answers
69 views

Centering rotated bar chart value

Using the following bar chart one can see that the label isn't really centered over the bar but placed more on the right. How can I center the value? The alignment has to be like that (rotated and ...
user avatar
0 votes
1 answer
79 views

Code for color in histogram [duplicate]

I would like to know the color codes that appear in the following histogram (code + image): \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \usepackage{pgfplotstable} \begin{document} ...
user avatar
  • 53
0 votes
1 answer
51 views

Fixing histogram drawn using pgfplots [duplicate]

I need to fix my histogram by: Setting the x coords vertically so that the text will be readable without pushing each other. Removing the exponential notations. Also I'm not getting why the vertical ...
user avatar
0 votes
1 answer
78 views

pgfplots bar chart enlarge axis [duplicate]

I would like to create a bar chart using tikz. I want it to look like that: but when I added the data, I got something like that: Is there a way to enlarge the x-axis over the textwidth or some ...
user avatar
2 votes
1 answer
97 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 ...
user avatar
  • 143
1 vote
2 answers
147 views

latex bar chart values are overlapped. If I rotate, then looks weird

I have bar charts that compare computation time of algorithms. The value above each bar represent the time and because they are bigger than they should be, some values are overlapped to graph or ...
user avatar
  • 115
1 vote
2 answers
73 views

How can I space the bars evenly in this pgfplots?

I made a bar chart with two axes, because of this I have to manually space the bars to fit. I want the orange support bar to be moved to the right, I know I can do this using bar shift. However, for ...
user avatar
0 votes
0 answers
41 views

Generate bar chart with pgfplots with doubling ticks [duplicate]

I am trying to generate an easy bar chart with 4 bars in pgfplots. I don't know why, but the x coordiantes are now twice on the x axis without an actual value. What I wanted to have was only 4 bars ...
user avatar
1 vote
1 answer
138 views

pgfplots' Default Cycle List Color Definitions

When creating a (bar) plot in pgfplots, tex uses a default list of colors. What are the definitions of these colors?
user avatar
  • 390
0 votes
1 answer
58 views

Tikz: Configure distance between two specific bars in a group of bars

I have a grouped bar chart as follows below. I'd like there to be a slightly bigger distance between every red and blue bar. Of course, I could just add another white bar between the red and the blue ...
user avatar
  • 177
1 vote
2 answers
62 views

Pgfplots: nodes near coords throws "Undefined control sequence" error

I am trying to plot a bar chart using tikz. I am struggling with placing numbers above the bars. I use the "nodes near coords" option but I always get "undefinded control sequence" ...
user avatar
  • 51
1 vote
1 answer
35 views

Multiple elements not visible in pgfplot

I have a few issues with getting a pgfplot right. I do not have much experience with pgfplots and neither online tutorials nor the pgfplots manuel could help me. The plot I want to create is a bar ...
user avatar
0 votes
2 answers
67 views

How to mimic this bar-chart style?

Recently I had to redraw a bar-chart in a style similar to the screenshot, using black, white and gray. Obviously, none of the available packages supports this style. How to do it, e.g. with pstricks ...
user avatar
  • 1,735
0 votes
1 answer
39 views

Draw barchart groups with \pgfplotsinvokeforeach

I'm using \pgfplotsinvokeforeach to try to draw 2 series on a bar chart. This is a pre-requisite and I can't change this (since part of a bigger project). However, since I'm using 1 single addplot ...
user avatar
  • 1,945
0 votes
0 answers
24 views

Additional half-bar to bar graph

I am trying to draw a picture from lecture notes. It looks like this: I have been able to draw everything except the red part, with the following code: \begin{figure} \begin{tikzpicture} \begin{...
user avatar
  • 101
0 votes
0 answers
78 views

How to plot data in Latex with a two level x axis

I want to create a plot for a latex document based upon data like this 1 1 11.5 1 2 11.2 2 1 11.0 2 2 10.8 2 3 10.5 3 1 9.5 3 2 9.1 3 3 9.05 3 4 9.0 4 1 8.95 4 2 8.9 The first two columns should ...
user avatar
  • 1
1 vote
1 answer
71 views

Simple problem with a bar graph

I am trying to do a simple bar chart, but I can't get rid of additional elements in the x axis legend. The graph function adds a "2001" and "2022" at both extremes of the x axis ...
user avatar
0 votes
0 answers
73 views

Tikz: stacked bar chart width and numbering

I have a bar chart below. However, it has several problems. First, I would like to increase its width so all bars are separated and showed properly. Second, I would like to hide all of the numbers for ...
user avatar
  • 447
0 votes
0 answers
38 views

References for making histograms [duplicate]

I would like to produce a histogram as similar to the following as possible. The histogram itself is not too structured, so I guess it shouldn't be too hard a task, but I am kind of struggling to ...
user avatar
  • 343
0 votes
1 answer
200 views

How to shift bars in bar graph?

I have plotted the following figure: I would like to shift the green bars to the right, so they become adjacent on the right of the blue bars. Yet the green and blue bars have the same vertical axis,...
user avatar
  • 161
2 votes
1 answer
129 views

Dynamic tikz bar plot from JSON data

I have JSON file that looks something like this { "data": [ { "type": "SENIOR", "male": 350000.0, "female": 225000.0 ...
user avatar
  • 131
1 vote
1 answer
81 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 ...
user avatar
  • 101
1 vote
0 answers
68 views

Bar chart with `tikz-pgf` specifying the breakpoints between cells

I would like to draw, with tikz-pgf, a bar chart by specifying the breakpoints between histogram cells and the corresponding frequencies. The breakpoints are: -1.4 -1.2 -1.0 -0.8 -0.6 -0.4 -0.2 0.0 ...
user avatar
  • 635
0 votes
0 answers
18 views

How to let a bar chart start from value different to zero with pgfplots [duplicate]

Following up on a previous question. How do I let a bar chart start from a value different to zero? Including negative numbers. As you can see when I plot the data from the table all bars start at ...
user avatar
  • 11
1 vote
0 answers
34 views

Horizontal bar charts with min and max data in pgfplots [duplicate]

I am trying to create a horizontal bar chart like the one in the picture below. For that I want to use data stored in a table like this: \pgfplotstableread[col sep=comma]{ system, Tmin, Tmax, ...
user avatar
  • 11

1
2 3 4 5
12