We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [nodes-near-coords]

A (scatter) plot style for pgfplots which places text nodes near every coordinate.

Filter by
Sorted by
Tagged with
11
votes
2answers
5k views

Center nodes near coords in a stacked ybar plot

I'm trying to center the node values, at the middle of each bar, in a stacked plot. However I can only put those nodes in the top of each bar. Is it possible to move those down? To the center of each ...
17
votes
2answers
2k views

Naming the nodes of `nodes near coords` for later use

I would like to use pgfplots command nodes near coords to get a list of named node ((no1), (no2), (no3) etc.) that I can use afterwards to draw some paths that I fail to construct with pgfplots only. ...
22
votes
1answer
14k 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} \begin{...
20
votes
2answers
2k views

How to minimize the ink-to-data ratio for pgfplots

Tufte advocates to "minimize the ink-to-data ratio" for charts. I am trying to style a multi data series bar chart, that can have a grid and axes as shown below (chart at the left is from the ...
6
votes
1answer
3k 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} \begin{...
11
votes
1answer
1k views

nodes near coords with logarithmic axis: Wrong values

I created a horizontal bar plot to compare benchmark times. Since one of the tested components is really slow, I need a logarithmic y axis for the other values to be distinguishable. Combined with "...
1
vote
1answer
615 views

How can I draw this population pyramid graph with pgfplots?

I'm using this code and it works fine: How can I draw a pretty population pyramid graph with pgfplots? But I want to draw the population pyramid like this in figure. Please guide me how to di it.
4
votes
1answer
1k views

pgfplots: “nodes near coords” on xbar chart is off

I am trying to make an xbar chart using pgfplots, and I'd like to add the bar's value to the bar. Simply using "nodes near coords" positions the value for a ybar chart, which isn't correct here. What'...
4
votes
1answer
785 views

Add colored circle around specific points in pgfplots

I wanted to add some transparent circles around specific points in my pgfplot like this: here is what I have so far: \documentclass{article} \usepackage{tikz,pgfplots} \pgfplotsset{compat=newest} \...
2
votes
1answer
532 views

pgfplots, xbar stacked: Prevent overlapping by shifting only one node

The following example results in two overlapping nodes (column 4 and 5 in row 0): \documentclass{standalone} \usepackage{pgfplots,pgfplotstable} \pgfplotsset{% ,xmin=0% ,/tikz/font=\...
2
votes
2answers
1k views

Plotting the sum of a function in TikZ

I am trying to plot a function that is the sum of another function based on the parameter. A famous example of this is the "sum of squares", however the functions I really want to do this do not have ...
3
votes
3answers
242 views

How to remove arrow from the Pgfplot pin option?

I was wondering how to remove arrow from pgfplots pin option. I do not want any line and want only text. Many Thanks in advance! Edit: Added MWE: I would like to remove the two arrows but want to ...
3
votes
1answer
759 views

Segmented bar chart under tikz plot

I'm trying to create a segmented bar chart (stacked bar chart) under my tikz plot: For each point, I want to make a segmented bar chart directly below the point. The segmented bar chart for each ...
3
votes
1answer
351 views

Creating a tornado plot with PGFPlots 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 ...
3
votes
1answer
523 views

Remove duplicate labels with symbolic y coords

I am new to pgfplots and have a problem with the following example: \begin{tikzpicture} \begin{axis}[title = Some fancy benchmark data, xbar, y axis line style = { opacity = 0 }, axis ...
0
votes
2answers
520 views

How to decrease separation between different plots? bar graph pgfplots

\usepackage{pgfplots} \usepackage{amsmath} \include{macros/style} \include{macros/use_packages} \usepackage{indentfirst} \usepackage{graphicx} \usepackage{algorithm} \usepackage{algpseudocode} \...
18
votes
2answers
8k views

Is is possible to rotate text using nodes near coords?

I'm plotting a ybar, and nodes near coords is ugly. Is it possible to rotate the text above the bars by 90? \begin{tikzpicture} \begin{axis}[area legend, legend pos=north west, legend columns=4, ...
7
votes
1answer
1k views

pgfplots: Set exponent of scientific number format for nodes near coords

As you can see, my plot currently has node labels with scale factors of both 10^6 and 10^5: My goal is to specify a scale factor of 10^6 for every node label: So my question is: How can I explicitly ...
5
votes
1answer
784 views

using bar chart to compare two groups of data, how to draw one node (showing the ratio) per two bars?

I have two groups of data, you can think of them as one control group and one treatment group, and each data point shows the system's performance under certain parameter x. Now for each value of ...
5
votes
1answer
816 views

pgfplots: percentages and endvalues in stacked ybar

I have two questions regarding the pgfplots package. I have attached the source code I worked on. There are two features I am not able to realize: I would like to put the total value (sum of the ...
7
votes
1answer
1k views

pgfplots: percentage in matrix plot

I'm trying to draw a matrix plot with the shown values in percentage. I already tried: nodes near coords = {\pgfmathprintnumber\pgfplotspointmeta\%} Unfortunately this didn't work out. Here is my ...
3
votes
1answer
1k views

Text nodes for nodes near coords

I'd like to have the customized text node labels for nodes near coords, For example, instead of the numbers (7,10,15 ...) on the right side of each bar, I'd like to have some text. \documentclass{...
3
votes
1answer
6k 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!). ...
1
vote
1answer
635 views

How to make particular nodes near coords labels bold in a pgfplots bar chart?

A follow up question to my previous question: I am trying to plot a simple bar chart. The data is read and sorted from a csv file. However I couldn't able to change the style of particular labels (...
1
vote
1answer
185 views

pgfplots: label bars that are taller than the plot area in ybar chart

I want to indicate the values for the bars that are taller than the plot area in some way. Maybe by having the label inside the bar or on top of the boundaries of the plot area. Note that, I only want ...
0
votes
1answer
2k views

PgfPlots creating bar chart from csv

Helo, I am working on my thesis, and need to include some performance numbers of software I wrote. I measured performance of several actions across multiple executions with different amount of data. ...
8
votes
2answers
184 views

pgfplots: node near coords missing due to rounding problems

I have the problem that in the following plot the right node near coords text of A is missing. The source of the problem is a rounding error in the data: They should sum up to 100 but in A it is a bit ...
4
votes
1answer
587 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
814 views

How do I apply “nodes near coords” to a single bar?

I want to change the position of a single node in a ybar plot. I know I am able to change the position of the nodes for a whole plot (by adding nodes near coords in the \addplot [...]), but in this ...
2
votes
2answers
312 views

PGFplots: Changing style of labels of nodes near coords

Trying to adopt this answer approach, I didn't manage to get what I want of changing the style of the nodes near coords labels. I would like to make this code poles={red, fill = blue, draw} work and ...
2
votes
1answer
1k views

How to specify number of decimal places in node near coords?

Is there a way to specify that node near coords labels should use 1 rather than 2 decimal places? For example, in the code below, Singapore is printed with 8.1 (correct), but Niger is printed with 46....
1
vote
1answer
726 views

How to customize only one node near coord?

\documentclass[border=2pt]{standalone} \usepackage{pgfplots,tikz} \pgfplotsset{compat=1.11} \begin{document} \begin{tikzpicture} \begin{axis}[ symbolic x coords={Germany,Spain,UK}, xtick={...
1
vote
1answer
27 views

“Node near coord” at the bottom of bar plots, but with symbolic coordinates

I need to place the "node near coords" below the bars of a bar plot instead of above, similarly to this question, but with a difference. \documentclass{report} \usepackage{pgfplots} \begin{document} \...