about creating bar charts using TeX/LaTeX/etc.

learn more… | top users | synonyms

3
votes
1answer
93 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
26 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} ...
4
votes
1answer
121 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
45 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
63 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
138 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
102 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
48 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
35 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
46 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
78 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
54 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
83 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
80 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 ...
1
vote
0answers
140 views

PGFPLOTs bar chart with zero data ymin=0 not respected

I have simple bar chart. With zero values in \begin{tikzpicture} \begin{axis}[ ybar, axis lines*=left, ymajorgrids, bar width=0.26cm, width=0.45\textwidth, ymin=0, y tick label ...
3
votes
1answer
158 views

adding single points to bar figure in pgfplots

I have a bar plot, in which I would like to add some single points overlayed on the bars. Those points are in another scale compared to the error bars. Below, I'm illustrating those single points in ...
2
votes
0answers
156 views

Zero space between bars of the same interval in pgfplots ybar interval plots

I need a bar plot (containing multiple \addplot) with following requirements: ticks between x labels (and, in this respect, my question differs from Adjusting width of ybar interval separator to ...
3
votes
1answer
636 views

Build a real histogram in pgfplots

Always in my long learning TikZ, I would build a "real" histogram from the following set of data : xi ni 1000 5 1200 8 1500 24 2500 13 3000 2 The idea is to group the data into ...
6
votes
1answer
156 views

Enlarge distance between bars

I want to create a bar chart. The bins are extremely close to each other, how can I increase the distance between the bars to let the labels on top of it stand a bit free and don't overlap anymore. ...
2
votes
0answers
95 views

Grouping bins in bar charts?

I have below bar-chart. I want to group the bars together by color. It makes no sense to compare the bins directly, but only the values with the same color directly. Is there a way to create two ...
2
votes
1answer
174 views

Creating an empty bar chart, for students to fill in data

What's the easiest way in Latex to create a simple, nice looking, empty bar chart -- I'll set up the axes appropriately, but students will fill in the data. To be specific, the bar chart will show ...
1
vote
1answer
97 views

2 histograms with common x-axis are not aligned

I have to following latex code: \usepackage{tikz} \usepackage{pgfopts} \usepackage{pgfplotstable} \begin{document} \begin{tikzpicture}[scale=1] \begin{axis}[minor tick num=1, scale only ...
2
votes
2answers
231 views

Bar chart using pgfplots with both positive and negative bars

I am trying to create a bar chart with both positive and negative stacked bars. However, my negative bar doesn't appear/it is hidden behind the positive bars. How should I change the settings to make ...
0
votes
0answers
57 views

Placing bar charts in a figure

I am trying to draw a figure with 4 basic blocks as follows: The first block is a simple labeled rectangular block (about 1.5X2cm) Immediately to the right, I want to put a rectangular container ...
3
votes
1answer
197 views

How can I add a reasonable padding to this bar chart?

I’m trying to add a uniform padding to all sides of this bar chart. In a different answer on tex.SE I have found the following code, however, I wasn’t able to find values for xmin and enlarge x to ...
3
votes
0answers
103 views

Compactifying histogram at empty tick values

I have the following histogram: \begin{tikzpicture} \begin{axis}[ x tick label style={ /pgf/number format/1000 sep=}, ylabel=Throughput, enlargelimits=0.15, legend style={at={(0.5,-0.15)}, ...
4
votes
1answer
193 views

Removing exponential numbers from pgfplots

I'm doing a horizontal bar chart, but in my x axis and in the number in each bar is exponential and I want a "normal" number. How can I do that? \begin{figure}[h] \centering \begin{tikzpicture} ...
4
votes
1answer
345 views

Change color of individual bars in histogram of binomial distribution

With the help of Positioning of Pgfplot axis labels I managed to create histograms of binomial distributions. What I still need is to select some of the bars and fill them with a different color or ...
4
votes
1answer
446 views

Remove space between x axis and bars in bar plot

I've created a grouped bar chart with pgfplots and pimped it with the help of a few questions here. The only remaining problem is that my x axis is at -1, whereas the bars start at 0. How do I get the ...
1
vote
0answers
176 views

Table of ybar plots with specific colors

I am trying to use specific coloring in an table of ybar plots. Maybe someone can help me out here. I have read other threads concerning the coloration of ybars but none of them really worked. This ...
2
votes
1answer
158 views

Fix group bar chart spacing

Consider the following MWE \documentclass[tikz]{standalone} \usepackage{lmodern} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usepackage{pgfplotstable} \begin{document} ...
2
votes
0answers
73 views

X label in multiple bars and problem in bars

Can someone help me in this problem? I am trying to draw an histogram, but I am having some problems. This is the histogram I have made so far: \begin{center} \pgfplotstableread{ 1 800 900 ...
5
votes
1answer
572 views

Spacing bars in ybar

I have several problems with this diagram: I am trying to create a template plot that I can use several times with different amount of bars. To simplify that I would like to define a fix bar width ...
3
votes
1answer
792 views

pgfplots: bar plots and xticklabels display

I have a bar plot and I would like to set x labels but when I do so, the x-axis is not appropriate: \documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} ...
3
votes
0answers
97 views

Creating a tornado plot with pgf and force a break in one of the horizontal bars

To display a sensitivity analysis I want to produce a Tornado plot. In the plot a specific base case value is compared to the values produced after changing parameters in the model. I started from ...
4
votes
1answer
213 views

outline a plotted graph?

To outline a path in white, one usually the draw the path larger and fill it in white, then copies the original path filled in black over it. This is to better separate it from the background. But ...
4
votes
1answer
276 views

Hide y labels in pgfplots, and make coordinates fit inside of the pdfplot box

I want to compare time spent on different simulation with bars from a pgfplot that show my simulation time. Here is the code: \begin{figure}[htbp] \centering \begin{tikzpicture} ...
4
votes
1answer
318 views

Expressing a y-only shift with `axis direction cs` with symbolic x coords

I have a vertical bar chart with error bars. I want to put a star just above or below the error bar where the results are significant. I achieved this using the very neat trick provided in this ...
4
votes
2answers
357 views

Trouble with Tufte-style bar chart

I am studying this article: "Tufte-style Bar Charts with pgfplots". I was able to come up to step #4, and was stuck, removing the border from the bars: \definecolor{tufte1}{rgb}{0.7,0.7,0.55} ...
7
votes
1answer
1k views

How to draw Latex multiple bar chart with error bar

Can someone help me with putting error bars on multiple bar graphs. This is what I currently have and it doesn't look any good, so far :( \begin{figure} \begin{tikzpicture} \begin{axis}[ x tick label ...
5
votes
1answer
236 views

Unclutter a bar plot with pgfplot

I have the given bar plot with three hirachies (color + inner-group + outer-group): The figure look overloaded but I don't know how to split the x axis labels in a better way. A possible solution ...
4
votes
1answer
156 views

pgfplots: symbolic coordinates with line skipping

I am trying to skip lines inside the symbolic X coordinates of the following pgfplots Bar Chart : \documentclass[a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{color} \usepackage{amsmath, ...
3
votes
0answers
140 views

create bar chart from select table row(s) for select column

The code below creates a bar chart but does not use the included data table. I would like to create the chart for an arbitrary year by specifying the year and using the table. Possible? ...
1
vote
0answers
87 views

How can I horizontally align the bars of two barplots

I would like to align the clusters of the two barplots of the figure below. For instance, I would like that the cluster of "Program-2" on the second bar appeared just below the "Program-2" cluster ...
3
votes
1answer
182 views

bar chart - 'inner' x ticks?

i've successfully created my first 'bar chart' today: by the use of the code given below: \documentclass[tikz,border=1pt]{standalone} \usepackage[ngerman]{babel} ...
4
votes
1answer
292 views

Create Yes/No bar charts

I am collating data from a survey and I want to create a bar graph like the one below: Can anyone provide me with a template of that chart? I tried to inflect bar chart and stick the two together ...
4
votes
2answers
311 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 ...
1
vote
1answer
183 views

pgfplots - plusminus doesn't match its definition

I've been trying to make a ybar plot with error bar using pgfplots. I want to make this graph inside a tex template, but one weird thing has occurred - when I inserted the following code (be more ...
6
votes
1answer
175 views

plot legend : increase its area

So my question in general is what is the method to change the precise area of the rectangle used in pgf plots? Yes, to make it larger ... MWE: a typical bar chart ...
5
votes
2answers
250 views

Barplot: alternating colors, bars side by side

I'd like to have a barplot with bars side-by-side and with alternating colors. It should look like the ouput of the code below, just with alternating bar colors. (Got the idea from here) ...