Questions tagged [bar-chart]

about creating bar charts using TeX/LaTeX/etc.

Filter by
Sorted by
Tagged with
0
votes
0answers
42 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}, ...
3
votes
1answer
48 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} \...
0
votes
0answers
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 [...
0
votes
0answers
36 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 ...
0
votes
2answers
59 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 ...
0
votes
1answer
59 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} ...
0
votes
1answer
47 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 ...
0
votes
1answer
40 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 ...
2
votes
1answer
61 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 ...
1
vote
2answers
63 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 ...
1
vote
2answers
62 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 ...
0
votes
0answers
29 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 ...
1
vote
1answer
59 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?
0
votes
1answer
25 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 ...
1
vote
2answers
54 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" ...
1
vote
1answer
31 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 ...
0
votes
2answers
56 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 ...
0
votes
1answer
36 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 ...
0
votes
0answers
19 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{...
0
votes
0answers
59 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 ...
1
vote
1answer
58 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 ...
0
votes
0answers
55 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 ...
0
votes
0answers
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 ...
0
votes
1answer
102 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,...
1
vote
1answer
60 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 ...
1
vote
1answer
60 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
0answers
65 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 ...
0
votes
0answers
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 ...
1
vote
0answers
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, ...
0
votes
1answer
32 views

How to tweak skills bar to show "out of 5" instead of "out of 6"?

I am quite new to LaTeX and have been using it mostly to write up my assignments. I have since taken on the challenge to re-write my resume using LaTeX too and I have grown quite fond of the ...
0
votes
1answer
40 views

Add space between two specific bars in an histogram?

I have a series of graphs with arbitrary data, so I am creating them using one \addplot for each bar. For sake of readability, I need to isolate one bar by adding some space after it. How can I add ...
1
vote
1answer
33 views

formatting xaxis labels

is there any way to have commas in the symbolic xcoords. i would like to add them to the numbers on the xaxis but i'm not sure how to go about this. this is my code so far \documentclass[12pt]{article}...
1
vote
1answer
41 views

Bar chart with coordinate system

I'm working with anonymization and the GDA-Score. For a paper I wanted to make the following plots: Can someone help me getting such a coordinate system with charts? So far I was only able to get a ...
0
votes
1answer
28 views

adjusting bar graph plot

i am trying to create this bar graph but it is starting so far away from the beginning of the axis, is there any way that i can "push" it closer to the y-axis line. right now the graph is ...
0
votes
2answers
67 views

Bar graph showing timeout (go off the page)

I'm trying to make a bar plot showing the runtime of some programs and I would like to have some of the bar plots run off the top of the page. Currently, I do this by setting the values of the bars to ...
1
vote
1answer
55 views

Making all bar labels appear above bar and not use scientific notation

Currently all the labels in my bar chart are not appearing above the bars and I'm not sure why. Also, the labels seem to automatically use scientific notation which I don't know how to change either. ...
2
votes
1answer
54 views

Adding labels to bar chart

I am trying to add labels on top of the bars in my graph but it is not working. I want it to be the y-value that shows up but instead its numbering the bars. This is my code so far: \documentclass[...
0
votes
1answer
58 views

Nested or Group Bar Group

I am trying to build a grouped bar chart and have following questions: I have to have multiple bar graphs(4) for Turquoise, Purple, Red, Blue, Green. In addition, can I split 4 bar graphs belonging to ...
1
vote
1answer
52 views

Major and minor labels for pgfplots x axis

Dear community, I am trying to build a stacked y bar diagram using pgfplots version 1.16. The stacked bars are no problem but the labeling of the x axis. I am trying to rebuild the following diagram ...
2
votes
1answer
38 views

How to add lanes to tikz bar plot

\documentclass[border=5mm] {standalone} \usepackage{pgfplots, pgfplotstable} \begin{document} \pgfplotstableread[col sep=comma]{ activity,start,end $a1$,12,19 $b1$,25,32 $d1$,26,33 $e1$,35,40 $h1$,...
2
votes
0answers
33 views

Negative axis drawn on Bar Chart axis

I'm building a macro to draw a bar chart using Tikz. When all the values are 0, tikz draws a negative axis, and I don't know how to prevent this. Here is a MWE : \documentclass[tikz, border=2mm]{...
1
vote
0answers
41 views

Label Bars in a Tornado Chart (LaTeX, Pgfplots)

I'm working on a tornado chart and I want to label the 6 horizontal bars. So far, this is what I've got: \pgfplotsset{TornadoPlot/.style={width=\textwidth,height=8cm, xmin=-20,xmax=20, line width=1pt, ...
0
votes
1answer
42 views

Bar chart with different groups

Let's say you have a grouped bar chart that looks like this: What I would like to do is add another bar for a new xtick, X0, that belongs to another group, A. My naive attempt at adding this data ...
3
votes
1answer
46 views

I am trying to draw a stacked group bar chart using pgfplots. Unfortunately, the rightmost bar is not rendered

Here is my code: \begin{figure}[h] \caption{Test Caption} \centering \begin{tikzpicture}[ every axis/.style={ ybar stacked, ymin=0,ymax=100, ymajorgrids = true, x tick label style={ ...
2
votes
3answers
212 views

Creating circular sectors of different radius at different angles

Tikz newbie here. How can I draw something like below in tikz. The angles/radius of each sector are fixed but the locations may change. Text/grid are not needed. Here is what I have so far \...
1
vote
2answers
66 views

Define bar width based on x-axis scale

I would like to be able to define the bar width of a bar chart based on the x-axis scale. For example, if x is between 0 and 4, I would like to set the bar width as 1 (one-quarter of the x-axis).
0
votes
0answers
29 views

pgfplots: add margin 'whisker' to barchart [duplicate]

I have the following bar-chart with 5 sets of 2 bars. For some of the individual bars, there is a margin in the (upper) value. I would like to express this similar to a boxplot, with a 'whisker' on ...
0
votes
0answers
55 views

3D bar chart with pgfplots

I want to draw a three-dimensional bar chart. I used this MWE code to draw two-dimensionally. Is it possible to draw in 3D like the last photo? MWE:(Source) \documentclass{standalone} \usepackage{...
0
votes
0answers
44 views

Grouped and stacked bar chart

I would like to know how to create a bar chart similar to the image attached with stacked bar and grouped. To make the columns grouped I know the option necessary is ybar = 0pt, while to get stacked ...
1
vote
1answer
32 views

Chart Label in two lines

I created the chart below and would like to change the ylabel "Fusionierte Theater" two have each word in one line. Is that possible? I would also like to get "Anstalt" "...

1
2 3 4 5
12