about creating bar charts using TeX/LaTeX/etc.

learn more… | top users | synonyms

2
votes
1answer
24 views

Using a pgfplots style for error bars

The following MWE shows two bar plots with error bars. \documentclass[a4paper,10pt]{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \pgfplotstableread{ ...
2
votes
1answer
29 views

Change y range at symbolic y coords

I have the following tikz code \begin{tikzpicture} \begin{axis}[ xbar, y axis line style = {opacity = 0}, axis x line = none, ...
1
vote
1answer
20 views

Vertical bar chart with level indicator

I need a vertical bar chart indicating the noise allowed levels. I wrote this MWE: \documentclass{article} \usepackage{pgfplots} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=1] \...
1
vote
1answer
37 views

Positioning of Bar plot in Latex

I try to have two bar plots side by side in using tikzpicture in subfigure. In my document, it looks like this: This does not look good. Problems are: It covers partly the text. The 2 bar plots ...
0
votes
1answer
48 views

Layout of bar charts in Latex

I created a bar chart, but it does not look good: Problems: the values above the bars does not look good. I want to have it on top of the bars and with slightly smaller font size. 2. The lay-out ...
2
votes
0answers
18 views

Label in xbar stacked not shown

I'm using pgfplots 1.7. In the following plot the labels for the bars are not shown. \documentclass{article} \usepackage{pgfplots} %\usepackage{pgfplotstable} \pgfplotsset{compat=1.7} \begin{...
1
vote
1answer
23 views

How to get the spaces properly on the x axis, how to place the y values on the corresponding bars?

I am using the following commands to draw a barchart. \begin{tikzpicture} \pgfplotstableread{ % Read the data into a table macro Label Female Male 2006-2008 ...
1
vote
0answers
37 views

How to place a bar one on the other in bar charts?

I know how to draw for single data... but How to draw the bars one on the other where the data's grouped \documentclass[varwidth=true, border=2pt]{standalone} \usepackage{pgfplots} \begin{document} ...
1
vote
0answers
39 views

How to do 3d barcharts in latex using tikz?

I wanted to do a barchart for annual report. I have made it in excel There are so many problems of using this in latex as it is since I dont want any backgroud for this. In the sense that it has to ...
1
vote
1answer
41 views

Changing commas and dot on bar graph

Here's what I have right now: Is there a way to change commas for dots and vice versa? This table was made using the answer from this question, so it's basically the same thing. This isnt't an ...
7
votes
1answer
161 views

How can I get a stacked bar with single values and sum on the side

Based on this question I was able to put partial and total values on my bar plot. My bars have some really small values though and it is impossible to fit the numbers in some ranges. I would like to ...
0
votes
0answers
51 views

How to make a grouped bar plot with different sized bars?

I want plots with grouped bars, two y axes and bars of different size shown in the Pictures below: What i got so far: \documentclass[x11names]{article} \usepackage{pgfplots} \begin{...
1
vote
0answers
39 views

Add spacing between every second bar tikzpicture

So I've created this chart below from a .csv file with the code at the bottom. However I would like to add some spacing between the 2&3 bars and 4&5 bars. Is this possible or do I need to ...
3
votes
1answer
63 views

Missing xtick labels from table in bar plot whenever y value is nan

Given a picture like that: \documentclass[12pt]{article} \usepackage{pgfplots} \usepgfplotslibrary{external} \tikzexternalize \pgfplotsset{compat=newest} \pgfplotstableread[col sep=comma]{ netname,...
6
votes
1answer
2k views

Stacked bar-plot: display total value

Is there a way to make pgfplots display only the total value of a stacked bar-plot? With nodes near coords, all segment-values are shown: I'm only interested in the sum of the stacks, though. ...
3
votes
1answer
59 views

Assigning xlabels to symbolic x coords

I am using the below code to generate the shown bar graph. However, I cant find anything with which I can label each of the individual bars for both sets of my data. i.e say the bar marked 0.67 I want ...
1
vote
1answer
53 views

bar graph not showing the first bar with pgfplot

I have the following table in a .txt file Group Real Imag Cable VSC P-mode VSC Vdc-mode A -1.2739095e+02 -3.3612954e+02 4.9822998e-01 4.9309456e-01 8.6754595e-03 B -3....
0
votes
0answers
25 views

Bar chart in Latex for numbers occurency

I have the following set of data (it is only a part, in reality is way longer than this): 200 200 0 0 4 4 4 8 20 8 20 and I'd like to build a bar plot in Latex where the X-axis reports all the ...
0
votes
1answer
94 views

How to display the y-values of each bar in pgfplots bar chart above the bar?

I am using code from this thread. link: Making one bar in a bar-graph stand out pgfplots Everything is working fine but I want to display the y-values of each bar in pgfplots bar chart above the bar. ...
5
votes
2answers
230 views

How to customize Tikz Gantt chart

I am trying to find a way to obtain the following using tikz (actually using pgfgantt): The code I have so far is: \documentclass[tikz]{standalone} \usepackage{pgfgantt} \begin{document} \begin{...
2
votes
1answer
60 views

Density and overlapping in tikz chart

I got the following code right now for my chart: \begin{figure} \setlength{\fboxrule}{0pt} \fbox{ \vspace*{-100pt} \begin{tikzpicture}[every node/.style={font=\scalefont{1}}] \centering \...
1
vote
0answers
70 views

Drawing Bar charts with Std.deviation and Confd.level with PGFPlots

I want to draw a bar chart where on each bar it shows the standard deviation(and also confidence level). I tried using following solution but I get the "dimension too large" error. Basically I have ...
1
vote
3answers
232 views

How to do a chart with stacked bars, lines and “sections”

The problem I need a chart like this (this was made in Libreoffice + some gimp): Its caracteristics are bassically: Some stacked bars (if it is a stacked area, better) with its Y axis at the ...
6
votes
1answer
127 views

pgfplots: change order of barplots

When one has more then one barplot in one pgfplots axis like in the following example then the red plot at the top of the code ends up as the bottom bar of the plot. I do find this confusing -- ...
2
votes
1answer
70 views

Positioning tikzpicture and determining range for axis

In another question I got great help creating this picture: Actually it looks how it should but there are two further things I would like to clarify: Firstly, I get this warning: Axis range for ...
0
votes
1answer
90 views

How to unstack grouped bars in pgfplots bar-charts

I am sure this is quite a trivial problem, but I cannot seem to figure it out. I have a bar-chart with preferably three groups of four bars. The thing is, using the MWE below, the four bars per group ...
3
votes
1answer
352 views

Basic Bar Plot with long text legend, horizontal guides and percentage values

I am new to pgfplots and actually I want to create something pretty basic. Yesterday, I started modifying my chart with the help of the pgfplot manual and the help of Google but unfortunately, I ...
4
votes
1answer
140 views

Misplaced nodes near coords in stacked ybar plot

I have this stacked ybar plot and having trouble to proper align the nodes near the coords. It works fine on all bar but the one with offset 65. I already tried \ifnum as @Jake suggested here: How can ...
5
votes
4answers
654 views

stacking negative value for ybar

I would like my ybars to be stacked the same way positively than negatively. It works for positive values but not for negative ones. On the given example, ThirdCol should be stacked negatively. Any ...
4
votes
3answers
545 views

Stacked bar plot with explicit axis domain

I have a data table which contains positive and negative values for different categories (columns) as input. I want to visualize these values by a stacked bar plot, which shows a stacked bar plot for ...
3
votes
0answers
499 views

Free space in bar-chart with empty entries

I would like to plot some data set with the ybar option of pgfplot. But not all entries are nonzero. The zero entries waste space between the bars and when the plot gets crowed it is not clear anymore ...
3
votes
1answer
149 views

pgfplots legend with two ordinates (lines and bar chart)

In the legend, I would like to have a line for the red and orange lines (as it is the case), and ybar legend style for the rest. I just can't figure out the easiest/best/any way to do it. MWE: \...
0
votes
1answer
99 views

how to insert number inside the stacked bar?

I tried stacked graph but i need inside bar to set alphanumberic like p1,p2,p3. My MWE \documentclass{article} \usepackage{pgfplots} % to print charts %\pgfplotsset{compat=1.8} %\...
6
votes
1answer
350 views

colour each x co-ordinate with a different colour in a bar plot in pgfplot

I want to cycle colours for each x co-ordinate in a bar plot. Is it possible? For instance, in this example I want each metric to appear in a different colour. This question Colors and legend in ...
4
votes
1answer
112 views

How to evaluate the height of a ybar to change color of label accordingly

Problem I want to change the color of a node near coords label depending on the height of the bar it lies on. That is, if the label is outside the bar I want to put a color that is different from the ...
1
vote
2answers
89 views

How can stacked bars be plotted?

I try to create a stacked bar plot with given values with the pgfplots package, but it shows some errors. Can anyone correct the given errors? \documentclass[border=10pt]{standalone} \usepackage{...
0
votes
1answer
41 views

Changing color on advanced bar chart (pgfplotstable)

I have made a stacked and clustered diagram, based on this brilliant answer: http://tex.stackexchange.com/a/55559/93892. However, I would like to change the colors of the bars. The most important ...
8
votes
1answer
172 views

Two plots, change bar plot reference system only

TL;DR How can I make a horizontal bar plot with the origin on the right? I wanted to combine several plots in a unique figure. I have a custom scatter plot, and I want to overlay it on top of a bar ...
1
vote
0answers
98 views

From a bar chart with multiple values per ticks to a stacked bar chart

I succeeded to generate a bar chart from a table which provides multiple values per ticks. The code is given in the following code: \documentclass{standalone} \usepackage{pgfplots} \usepackage{...
1
vote
0answers
25 views

Insert space after each second bar

I have a bar plot which shows 7 bars for one xtick. I want to group two bars by inserting some space after each second bar. I tried to use xshift in the \addplot command, but the color of the bar ...
2
votes
2answers
131 views

pgfplots: annotate each bar in a group with custom values

how can I add custom annotations to each bar in a grouped bar chart? I know how to display the values from the the bars (with every node near...), but the values I need to display, above or below the ...
2
votes
1answer
138 views

Pgfplots: vertical bar char prints only labels at one bar

I want to create a vertical bar charts with two bars in it. At the x-axis the bars shall be labeled with A and B. The label A is printed although it is not exactly properly positioned, but the label B ...
3
votes
1answer
543 views

Cyrillic text in symbolic x coords

I make bar plot with pgfplots: \documentclass{report} \usepackage[T2A]{fontenc} % Поддержка русских букв \usepackage[utf8]{inputenc} % Кодировка utf8 \usepackage[english, russian]{babel} % Языки: ...
4
votes
1answer
92 views

Add areas in background of histogram

I would like that my histogram has areas in background (with name), in order to compare the value of each bar with some intervals. This is the result that I would like to reach: And this what I ...
0
votes
1answer
178 views

How to draw multiple bar charts each one with multiple different series

I want to draw a chart which includes multiples bar chart, and each one include different series. This is what I ´ve already have. In this case Alg 1, Alg3,..., Alg 7 would be my multiple bar charts, ...
2
votes
1answer
200 views

Symbolic Labels in pgfplots Bar Chart

In the following code, why do I have to type the x-axis labels explicitly in the axis options and not just use the labels from the coordinates data? Is there a way to just use the data from the ...
1
vote
0answers
201 views

Create a bar chart from CSV

I have a .csv file that looks like this: gender.csv GENDER,NUMBER,PERCENT MALE,20,20 FEMALE,80,80 TOTAL,100,100 I want to create a bar chart using MALE and FEMALE. GENDER can be the chart name or ...
1
vote
0answers
131 views

Two axis y discontinuity=parallel

I am trying to complete this bar graph with two y discontinuities since my third coordinates are too far from the remaining two coordinates. Below is a MWE can anyone provide me with an approach to ...
4
votes
1answer
153 views

Barchart with pgfplot in beamer slides

I am trying to use a code in my beamer presentation for a barchart that I had previously used for an article type document. I am using TeXstudio as the editor. Everytime I try to compile, the ...
5
votes
1answer
280 views

pgfplots ybar plot with 2 y axes and equal shift on x axis

I am trying to create a ybar plot with two y-axes and proper alignment on the x-axis. I have two data sets to compare and what I'm trying to get is the look of a normal ybar plot with horizontally ...