about creating bar charts using TeX/LaTeX/etc.

learn more… | top users | synonyms

1
vote
1answer
22 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 ...
5
votes
2answers
158 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} ...
2
votes
1answer
43 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
44 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 ...
0
votes
1answer
70 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. ...
0
votes
0answers
16 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 ...
6
votes
1answer
80 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
56 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 ...
1
vote
3answers
183 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 ...
0
votes
1answer
59 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
190 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
96 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 ...
3
votes
1answer
100 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: ...
5
votes
1answer
230 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
102 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 ...
0
votes
1answer
37 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 ...
0
votes
1answer
85 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} ...
1
vote
2answers
87 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} ...
1
vote
0answers
68 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} ...
8
votes
1answer
137 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
21 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
92 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
96 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 ...
4
votes
1answer
91 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 ...
2
votes
1answer
144 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 ...
0
votes
1answer
151 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, ...
1
vote
0answers
106 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
98 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
174 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 ...
1
vote
1answer
256 views

PGF barplot with two y axis

I added a new axis to my barplot and that has a different scale as the first one. The second axis is shifted and does not have the same height as the first one. What do I need to change so that the ...
3
votes
1answer
93 views

Tikz stacked ybar chart shows incorrectly when I change the lower limits of the y axis

I have a problem with my picture generated using the tikz package. I would like to represent a y-stacked bar plot with the correct axis scaling. When I put the lower limits for the y-axis at -100 or ...
3
votes
1answer
129 views

Adding lines to bar charts

Is it possible to add a straight horizontal black line (from (0, 0.4) until the very end of the graph) in a bar chart environment like this: Here is the code that generates this bar chart (borrowed ...
1
vote
1answer
316 views

How to correct nodes near coords position in ybar stacked?

I'm working with this ybar stacked graph, but I can't position the nodes near coords in a correct position (not over something, not outside the chart, not over other bar, not to far away...readable!). ...
3
votes
1answer
94 views

Show mark labels near marks and not centered in ybar interaval graph

I'm doing a graph with vertical bars (ybar) where each bar represents not a number (1) but a class ([-0.5,0.5]). I would prefer that tick labels on the x axis appeared near the ticks marks, so ...
4
votes
1answer
168 views

How to hide empty (value 0) ybars with pgfplots?

I'm making a ybar graph (vertical bars) where the y axis maximum reaches 150+, but a lot of values are 0's. I would like the final graph would not show a minimum bar in this 0 values, since we this ...
8
votes
1answer
249 views

Histogram: different color for each bar

I have the following code. \documentclass[a4paper,twoside,12pt]{article} \usepackage[T1]{fontenc} \usepackage[utf8x]{inputenc} \usepackage[english]{babel} \usepackage{pgfplotstable} ...
3
votes
1answer
336 views

pgfplots 3D bar chart - wrong plotting order

I am using bar3 to plot 3d diagrams in Matlab but it seems that in LaTeX the plotting order is wrong ? Is there any way to have the right order? This is a small example of the generated 2.tikz file ...
1
vote
0answers
32 views

Eliminating excessive spacing in bar graphs

How can I eliminate the spacing to the left and right of my bar graph? \documentclass[12pt]{report} \usepackage{pgfplots} \usepackage{tikz} \begin{document} \begin{figure} \begin{tikzpicture} ...
5
votes
1answer
622 views

Combining line chart data with bar plot

Context I recently got a paper published and was told that I need to convert the word file I submitted to latex for camera ready purposes. Problem is, I don't know LaTeX but I have always wanted to ...
3
votes
2answers
284 views

Bar plot in pgfplots using a palette using only fill

I am trying to create some nice looking bar plots, but this does not seem to be an easy task for me :) I have started out with the following: \begin{tikzpicture} \begin{axis}[ xbar, xmin=0, ...
3
votes
1answer
161 views

Adding a trend line to a bar chart

I'm very new to LaTeX, preparing my very first document in the environment and learning on the way. I've encountered a problem with one of my plots - I'm trying to add a trend line to a bar chart to ...
2
votes
1answer
257 views

Broken bar diagram with tikz package

I am trying out tikz package to create bar diagrams and following the code example in the manual on page 82 ...
0
votes
0answers
155 views

Customize PGF bar chart bars

Ideally, I'd like to write a macro which specifies how to draw the bar of a PGF bar chart, given its height, width, and location. This seems nearly equivalent to asking how to specify a non-repeating ...
1
vote
0answers
74 views

How to make the column with line scatter graph. (Double Y)

I want to make this graph. I have only excel data.
1
vote
1answer
49 views

Fail to produce valid PDF from pgfplots sample code

I use the following the pgfplots sample code: \documentclass[varwidth=true, border=2pt]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ ...
1
vote
1answer
51 views

How can I make legends colourful? And how can I put value in bars?

\documentclass[border=5mm] {standalone} \usepackage{pgfplots, pgfplotstable} \usepackage{xcolor, color} \begin{document} \begin{tikzpicture} \definecolor{SpecialYellow}{HTML}{F9DC21} ...
2
votes
1answer
137 views

How to specify the starting point of a horizontal bar in latex?

How to specify the starting point of a horizontal bar in latex ? For example, I want to plot a horizontal bar between (2, 5) and (10, 5), which is a horizontal bar with a length of 8 and starting at ...
1
vote
1answer
124 views

Plot a horizontal bar which doesn't start from the y axis

As stated in the title. I want to plot a bar which doesn't start from the y-axis(i.e., where x = 0). I try to use the bchart package but I fail to achieve this. For example, my latex code is like ...
0
votes
0answers
154 views

Scale y data in bar plots with pgfplots depending on x ticks

I have an issue dealing with data scaling. I consider two different kinds of information (i.e. orange and apple eaten daily) depending on three different people. Now I need to display the factor of ...
1
vote
0answers
130 views

How do I uniformly change bar thickness, box width and add error bars?

I need help with a few adjustments on this group plot. I managed to solved my previous problem but now I´m searching for a needle in a haystack. 1. How do I make the bars thinner so they may fit ...