The tag has no wiki summary.

learn more… | top users | synonyms

12
votes
1answer
3k views

pgfplots using strings *from data table* as x axis labels in bar chart

I've seen some of the other threads on using strings as x axis labels, but nothing that fits my situation. I'm trying to create a bar chart from a CSV file. I can do it so long as everything in the ...
11
votes
1answer
2k views

pgfplots bar plot: spacing inbetween bars

How can I increase the spacing between the bars in a bar plot from pgfplots? \documentclass{minimal} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture} ...
10
votes
1answer
3k views

Grouped bar chart

I'm trying to construct a grouped bar chart and have three questions I can't seem to find the answer to: 1) How do I modify the spacings between the groups? Or at least make sure that no bars are ...
8
votes
3answers
157 views

Is it possible to create a barchart in a table?

I'm using booktabs to display some profiling data. I would like to add bars to each row to visually indicate the quantities in one column. I would like to use a table instead of a barchart since ...
8
votes
3answers
1k views

Bar chart given minimum and maximum values

I want to create a bar chart that looks like the one in the picture. For each x value I have the minimum and maximum value that represent the height that each bar should have. My problem though is: ...
8
votes
2answers
4k views

How to draw Bar & Pie Chart

I'm want to include two graphs mentioned below in a document. I'm able to draw pie charts using pgf-pie. Is there any package which is capable of generating BAR & PIE Chart both? [Also which ...
8
votes
1answer
1k views

Different color for individual bar in bar chart & adding bar labels

Please consider the following MWE. There are three things I would like to do: Individual colouring For the last element ("not rejected") I would like to fill the bar with another color (e.g. ...
8
votes
1answer
284 views

McKinsey curve in pgfplots (creating continuous cost curves)

I'm trying to recreate the Mckinsey curve in pgfplots: I'm not sure I understand how to control the \addplot with bar graphs completely (how to make each bar graph stand next to each other using ...
8
votes
1answer
135 views

Help with a simple bar plot

I have some data in a table; the first column has some names; the second column associates a "category" to each name, and the third column associates a "section" to each name. All entries are ...
8
votes
1answer
827 views

pgfplots need help with complicated stacked bar chart using selected rows from data table

I'm trying to recreate this bar chart from the data table found in the MWE below. It involves doing a couple things that I can't figure out: stack positive and negative bars on the same axis, ...
7
votes
1answer
1k views

pgfplots, bar graph, axis distance

I have a following chart, and I am trying to decrease the distance between the x-axis ticks FCC and Beta pi. Any suggestions on how to reduce this? \documentclass{standalone} \usepackage{pgfplots} ...
7
votes
1answer
2k views

Disable scientific notation for Y-axis and data in pgfplots?

I've been trying to figure out how to change the chart from scientific notation to just show the 5 digit numbers. I've tried scale and scale ticks with not success. How can I change the y-axis and ...
7
votes
1answer
143 views

Adding horizontal lines to pgfplots bar

I am using a pgfplots stacked bar to display the aggregated energy demand of a houshold and the associated price. When the energy demand exceeds a certain threshold, than a higher price has to be ...
7
votes
1answer
143 views

Use math equation as bchart label

I used bchart to generate a chart, it worked well in almost case, however I have to put a math equation into bar label but it is unable to compile. My document worked well ...
7
votes
1answer
2k views

Zero space between bars in pgfplots bar graph

I want to draw a bar graph with the bars touching, like in a histogram, using pgfplots. This is basically what I'm aiming for: That plot is generated with this code: \documentclass{article} ...
7
votes
1answer
607 views

X-Bar plot with intervall (a,b) rather than (0,a)

When one makes a xbar plot using pgfplots, the bar always goes from 0 to the requested coordinate. For example (p. 78 in pgfplots manual): \documentclass{article} \usepackage{pgfplots} ...
6
votes
2answers
478 views

Two-sided bar chart

I strive to make a bar chart displaying opinions for and against different topics. I tried to do this with pgfplots starting from bar and interval bar charts. Bars to both sides can be archived ...
6
votes
2answers
287 views

Annotate grouped bar plot

I'm trying to draw a grouped bar plot, but with added dots "on top" to signify outliers in the results. Currently I have: \begin{figure}[] \begin{tikzpicture} \begin{axis}[ ...
6
votes
1answer
87 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 ...
6
votes
1answer
593 views

Lining up angled tick labels on a pgfplots bar plot

I'm trying to produce a bar chart for publication with math text in the tick labels. The most readable layout would be to angle them, but when I do they clash with the axis and are difficult to relate ...
6
votes
1answer
2k views

grouped bar chart with pgfplots

I am trying to create a grouped bar chart with pgfplots, like this one: but I can't put the values over the bars, like this one: My code is: \documentclass{article} \usepackage{pgfplots} ...
6
votes
1answer
1k views

plotting a line in a barchart

Problem: line stops at given coordinates, ymax is not obeyed. \documentclass[a4paper,10pt]{report} \usepackage[left=1.5cm,top=2cm,right=1.5cm,bottom=1.5cm]{geometry} ...
6
votes
1answer
866 views

How to make a pgfplots stacked xbar plot with bar-“explicit meta” labels computed from input table data

I am making a pgfplots stacked xbar plot where each bar has a distinct label, in addition to a numeric bar length. Each pair of bars also has a common label. I would like to mark each bar with its ...
6
votes
1answer
1k views

Horizontal bar-charts in PGFPlots: “point meta” messes with alignment

I'm drawing a rather unusual bar-chart to display the results of a small survey. The axis of the chart extends in both the negative and the positive domain. However, there is no zero and all values ...
6
votes
1answer
79 views

How to do a shift/offset of ycomb or ybar **in y-direction** without stacking in pgfplots?

I am looking for a way to shift the reference bars in an XRD plot in order to be able to compare two or more plots in the same axis environment but have the references only where they apply. This ...
6
votes
1answer
131 views

Using PGFPLOTS to make vertical barchart with labels from data file

I have a version of this working with LaTeX Writer and PGFPLOTS 1.5.1 on my iPad. Moving over to Linux and TeXLive 2013 with PGFPLOTS 1.10 sees the Y AXIS LABELS disappear after the first. The bars ...
6
votes
1answer
519 views

Single stacked bar, values and legend

\documentclass{article} \usepackage{pgfplots} \begin{document} \pgfplotsset{testbar/.style={ title=strookdiagram sporten, xbar stacked, width=10cm, axis y line*= none, axis x line*= bottom, ...
6
votes
1answer
349 views

pgfplots: Aligning multiple bars and marks horizontally along symbolic X-axis

I want to plot average values of some measure as bar charts with error bars and its maximal values as marks above the bars. I use two separate plots for that now. The problem is aligning marks with ...
5
votes
4answers
898 views

How to compute an histogram (plot bars) binning the values from a .csv using TeX?

I've a .csv with a column of acquired measures. I would like to make the histogram bins using TeX from the measures distribution so I have to create the bins first. I haven't found any reference to ...
5
votes
2answers
115 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) ...
5
votes
2answers
266 views

pgfplots: Clipping Everything Outside a Specific Area

I want to add information to each column of a histogram. every node near coord is probably the best approach. It works well with bar plots but not with the histogram: \documentclass{article} ...
5
votes
1answer
138 views

axis lable in millions/thousands

I have a simple barchart, on the y axis i have values which are displayed full written (e.g. 5'000'000). I dont want to change the orginal data but change the y-axis lable into a fullwritten value ...
5
votes
1answer
2k views

PGFplot histogram using multiple barplots

I'am trying to create a colored histogram using barplots using the following code: \begin{tikzpicture} \begin{axis}[ybar, ymin=0, bar width=0.2cm, axis x line*=left, nodes near ...
5
votes
3answers
328 views

pgfplots stacked bar chart with markers

I have a stacked bar chart. I would like to add markers to the chart in some values. I am trying to create something like in the stacked bar chart. Is it possible to add markers instead of another ...
5
votes
2answers
253 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 ...
5
votes
1answer
683 views

Drawing a trend line on a bar chart

For the MWE below: \documentclass{report} \usepackage[left=2.5cm,right=2cm,top=2cm,bottom=2cm]{geometry} \usepackage[T1]{fontenc} \usepackage{pgfplots} \begin{document} \begin{figure}[H] ...
5
votes
1answer
140 views

Create bar chart with description from file

I'd like to create a bar chart read data directly from file, add detailed description directly inside/over the bars and write the actual value near the actual coord set bar color according to a ...
5
votes
1answer
593 views

Filling the bars in stacked bar plots with hash or dot points

I was looking for a way to fill the bars in bar plots or stacked bar plots with hashes or dots (something like the following figure). Since it took me a long time to figure it out how to do it, I ...
5
votes
2answers
539 views

Horizontal waterfall chart with labels for each bar

I've looked through similar questions here and here, but I'm still stuck. Basically what I'm trying to achieve is this plus bar labels: I have two problems: 1) My code sucks. Right now the y-axis ...
5
votes
1answer
360 views

Line graph superimposed on “Grouped Stacked” bar graph with pgfplots?

I need to superimpose a line graph over a stacked grouped bar graph (similar to answer to the question: Two level labels in bar plot). I have to superimpose a line graph for each group (it breaks at ...
5
votes
0answers
149 views

How can I create a 3D Manhattan bar chart? [duplicate]

I have some data which I would like to visualize. This data are 3-tuples of integers: (Threads,Sum,# of occurences) (1,2,20) (1,7,18) (1,100,25) (2,7,15) (4,103,24) I would like to visualize this ...
4
votes
1answer
192 views

Centering bars on xticks in pgfplots

My wife is working on her master thesis and we are trying to make some bar graphs to use with it. We have managed to create a nice-looking graph, but the labels/xtick does not align in center. When ...
4
votes
1answer
734 views

Adjusting width of ybar interval separator to width of histogram bars

I have an array of numbers for which I want to create a histogram for the first 22 entries. I want to show both the first few entries of the array as a bar plot as well as the histogram in two ...
4
votes
1answer
842 views

pgfplots: Positioning “node near coord” at the bottom of the bar

I would like to position nodes near coords at the bottom of the corresponding bar, right by the X axis. Here's what I've got now: \documentclass{report} \usepackage{pgfplots} \begin{document} ...
4
votes
1answer
481 views

Bar overlapping in bar plot

I created this graph using pgfplots: As you can see, the bars overlap near 0. How can I solve the problem? MWE \documentclass[12pt,a4paper,twoside,openright]{book} \usepackage{tikz} ...
4
votes
1answer
143 views

Position of the error bars in bar graphs in TiKZ

Help! I cant seem to get the position of the error bars right on top each bar. Also for some reason my legend seems to be off position too. \documentclass{article} \usepackage[utf8]{inputenc} ...
4
votes
1answer
124 views

Grouped BarChart

I would like to have all 4 graphs on one page (one panel) by using minipage. Also is it possible that I can have my graphs standing vertical instead of horizontal? Thank you. \documentclass{article} ...
4
votes
1answer
1k 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. ...
4
votes
1answer
305 views

pgfplot xbar legend ordering

when I am drawing a xbar chart, I have troubles with the legend entries. They appear to have the opposite ordering as I suppose they should have. \begin{tikzpicture} \begin{axis}[xbar] \addplot ...
4
votes
2answers
291 views

How can I get a stacked bar with single values and sum on top.

I have a stacked pgfplot like this: But I want the single values inside the bars and the total sum on top of the bar (this graphic is 'handmade'): How can I get this result? My attempt up to ...