Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [nodes-near-coords]

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

Filter by
Sorted by
Tagged with
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 ...
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, ...
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. ...
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 ...
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 "...
11
votes
1answer
3k views

pgfplots how to nicely place nodes

The picture produced by code blow, there are two problems I have. (1) the number above point overlapped (2) the precision of number is not right, eg. I want 0.913, not 0.91 For the first problem I ...
9
votes
2answers
1k views

how can I change the exponential value to decimal?

I want to make my plot completely in decimal. I used the function \pgfkeys{ /pgf/number format/precision=1, /pgf/number format/fixed zerofill=true } to make my decimal like 2.0 instead of ...
8
votes
2answers
530 views

Adding units to pgfplots nodes in column chart

The picture below is almost what I need and is generated by the MWE below. All I require is to include percentage symbols on the labels on the nodes. So they should read: 34%, 22% and 13%. -----------...
8
votes
2answers
2k views

Nodes near coord overlapping…how to shift up

I am using nodes near coords but as you can see the values on the bottom are overlapping. I have tried placing them manually but that hasn't worked either...How to just shift up the nodes so they do ...
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 ...
7
votes
1answer
3k views

pgfplots: nodes near coords only for one plot

Does anyone know how to set up pgfplots to print nodes only for one and not for all plots? For example, in 1 I would like to see the nodes only for the test-plot and not for the trend-plot. You will ...
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 ...
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 ...
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{...
5
votes
1answer
2k views

pgfplots - How can I use 'nodes near coords' with multiple data values for one tick?

When using displaying multiple values for a tick and then activating the display of the values/coordinates, things get messy. This is why I want to display the values inside of the bar. Or on the ...
5
votes
1answer
821 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 ...
5
votes
2answers
155 views

How to make lines joining point a target - tikzpicture

I have been able to do the code below but it is still not what I need. I need points a1 through a5 to form a straight line to the point "Gol". How do I do that? The .dat files look like this (...
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 ...
4
votes
3answers
156 views

How to show a “node near coord” even when it is out of bounds (with clip = true)?

I have a ybar graph using the pgfplots package in which I use nodes near coords to display y values near the tops of the bars. There are some outliers in the data, for which I'd like to show a bar ...
4
votes
1answer
651 views

Nodes Near coords hide when 0

Is it possible to hide nodes near coords in pgfplots when value = 0 ? I have something like this. And axis setting \begin{axis}[ ybar, bar width=3pt, nodes near coords ]
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
788 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} \...
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 ...
4
votes
2answers
568 views

Tikz stacked bars plot - change labels

I have the following bar plot. The code for this is: \documentclass{standalone} \usepackage[x11names]{xcolor} \usepackage{tikz,pgfplots} \usepackage{graphicx} \usepackage{ifthen} \usetikzlibrary{...
3
votes
2answers
2k views

pgfplots legend order

The following code draws a bar chart with number labels. I want the entries in the legend to be the other way around i.e. for there to be a gray box at the top with the label "two", and a white box ...
3
votes
3answers
970 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
2answers
62 views

nodes near coords from table

I want to add a non-numerical value as a node on a histogram. The labels come from a column in a table, fairly similar to this other question, i.e. using value \thisrow{<column>} as <macro>...
3
votes
2answers
484 views

Pgfplots: shift single nodes with nodes near coords

I use the following code. Is there a way to shift specific nodes of "nodes near coords" without placing every node itself which is a lot of work? The nodes at "Fichte" and "Kiefer" are overlapping ...
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
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
1k views

style odd and even nodes near coords differently

I'm using this style definition in the preamble: \pgfplotsset{ base/.style={ ymin=0, xtick=data, nodes near coords, } } \pgfplotsset{ random/.style={ ybar=3pt, bar width=...
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!). ...
3
votes
1answer
760 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
3answers
249 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
527 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 ...
3
votes
1answer
1k views

Mark nodes/coordinates by label (PGFPlots)

I am drawing a scatterplot, where the data is in a table and the values are labeled. I want to connect certain nodes with straight lines and in order to do so, one has to label the nodes/coordinates. ...
3
votes
1answer
289 views

Use BPchem Numbering As Labels in a PGFPlot

So, I yanked this example right from the manual on pgfplots, because this looks highly complex. The graph is exactly what I want to have, except instead of the custom labels it provided, I want to be ...
3
votes
2answers
107 views

pgfplots: How to hide “nodes near coords” if value is 0 (empty)?

Assumed we have this Minimum Working Example (MWE): \documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ ybar, ...
3
votes
1answer
58 views

error message when using nodes near coords

I'm quite new to using LaTeX, I only recently visited a course about how to use it and I now have to write a code to pass this course. Anyway, I've encountered a problem as I tried to make a bar ...
3
votes
1answer
155 views

How can you view the coordinates of the points in a linear regression plot?

I did some data collection and graphed this data using the pgfplots package. I created this linear regression graph using y={create col/linear regression={y=Y}}] as is described in the manual. This ...
3
votes
1answer
157 views

Barplot orientation -

I am new to creating graphs with Latex. The graph on the right is the original graph, I then decided it would look better if I change color for each classifier type and add the value of the bar on top....
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 ...
3
votes
1answer
225 views

PGFPlots: customize annotation for one point

I have the following scatter plot: \documentclass[class=elsarticle]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ enlargelimits=0.2, xlabel=Depth, ylabel=...
3
votes
1answer
956 views

Nodes near coords gives Undefined Control Sequence

I have the following example of a graph. I want to place the items in the table "Restart" next to the nodes. Everything works until I add "nodes near coords", I get a bunch of errors saying "Undefined ...
3
votes
1answer
152 views

Make text color value dependent in matrixplot

I'm trying to tweak this plot: pgfplots: percentage in matrix plot ... to have the annotations change color depending on the value. Above 50% should be white and below should be black. I have a ...
3
votes
1answer
261 views

Change the appearance of a single bar in grouped barplot

I'm trying to change the appearance of a specific bar in a grouped barplot with TikZ. But I can't find anywhere how to do what I want to achieve. Specifically, I have three groups of three bars, ...
3
votes
0answers
43 views

pgfplots stacked bar plots with too little space for some “nodes near coords” [duplicate]

When creating stacked bar charts with pgfplots, how can I avoid printing those (and only those) "nodes near coords" if there is too little space? The following MWE illustrates the problem: \...
3
votes
0answers
61 views

pgftables: nodes near coords align depending on value? [duplicate]

The following code results in node labels overlapping the graph. How can I align them depending on the graph so that '1375' und '1574' are below the node and the others still above? \documentclass{...
2
votes
2answers
670 views

Print comma instead of period in node near coord

I need to print the Y-values for each point with a comma for decimal seperator. See my MWE. The data is provided as a .csv within my folder. \documentclass{standalone} \usepackage{pgfplots,...