Questions tagged [nodes-near-coords]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
102 views

How to add floating label to bubbles in scatter plot in pgfplots in latex?

I am trying to add labels on the scatter plot but the problem is the plot being too congested. I want my labels to be floating, i.e, find the place wherever possible. I tried this code: \begin{...
2
votes
1answer
59 views

How to highlight a point in line graph by drawing a circle around it?

I want to highlight a point (i.e., (3, 4.8)) in the following line graph by drawing a red circle around it. However, as you can see, the circle is not drawn at the expected position. Why? And how to ...
1
vote
1answer
178 views

Stacked bar chart, nodes near coords remove small values and show sum

I know it is possible to have only the sum shown on top of the bar chart and remove the other values in the stacked bar chart (as shown in picture attached), but I can't figure out what went wrong in ...
1
vote
1answer
40 views

Positioning symbolic labels above bars

Looking to position the symbolic x tick labels above the bars. Also, wondering why the last bar isn't showing correctly. % Minimum working example \documentclass[varwidth=false, tikz, border=10pt]...
1
vote
1answer
30 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} \...
2
votes
1answer
45 views

How can I move certain nodes near coords in a bar chart depending on their value? [duplicate]

I want to write the values of bars in a bar chart (ybar) inside each bar, except for when there is not enough space. In that case, I want to write the value above the bar. This is my code: \...
3
votes
2answers
117 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, ...
4
votes
3answers
161 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 ...
0
votes
2answers
542 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} \...
3
votes
2answers
65 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>...
1
vote
1answer
44 views

Show error values on error bar

How can I show values of error on top of error bar? In the figure, I want to add values which are written with pencil in black. MWE: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{...
1
vote
1answer
61 views

pgfplots nodes near coords overlap when fixed, but other labels are misaligned?

The nodes (data labels) are being covered up by the error bars. I tried fixing this with: every node near coord/.append style={rotate=90,xshift=+0.7cm,yshift=-0cm} But, when I did this, the other ...
2
votes
2answers
327 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 ...
3
votes
1answer
353 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 ...
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. ...
1
vote
2answers
165 views

GRAPH OF percentages

I want create a definite structure. It's a percentage chart. This is my objective, I want to get this: I try with this code \documentclass[a4paper,twoside,12pt]{article} \usepackage[T1]{fontenc} \...
3
votes
1answer
228 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=...
0
votes
1answer
206 views

Shifting specific labels in pgfplots

I'd like to be able to modify the position of specific labels in a difractogram, most are ok, but some are positioned on top of each other and those are the ones I'd like to move. \documentclass{...
1
vote
2answers
203 views

Editing label on bar chart

Hi I drew a bar chart and added the label onto each bar. However, as you can see I'm trying to state the relative difference between two facades, in some cases, i.e. the first two bars and the last ...
1
vote
1answer
137 views

Bar figure and inside text with icons

How can I reduce the the space between the age groups and add a male or female icon on the top from fontawesome package? Could the age-groups be in the middle of the male and female distribution? ...
1
vote
2answers
335 views

pgfplot/tikz stacked bar chart, with compat=1.9 or later

Inspired by this question, pgfplot/tikz stacked bar chart, I've been trying to create a stacked bar chart with numbers at the end of the stacked bars. However, the location of nodes near coords was ...
3
votes
1answer
60 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 ...
1
vote
2answers
72 views

Put label on ycomb

I read data from two files and plot ycomb. I would like to calculate difference between values and put it on top of greater value such as shown in figure. How can I do this? \documentclass{standalone}...
0
votes
2answers
259 views

How to add additional x-axis labels to each bar in a ybar chart? [duplicate]

I've drawn a ybar chart in pgfplots as below, and I want to add additional x-axis labels, as indicated by what I've drawn by hand in orange. Question: How do I add additional x-axis labels to each ...
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 ...
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{...
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{...
0
votes
1answer
704 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. ...
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
542 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%. -----------...
2
votes
1answer
377 views

Setting two pgfplots-styles to be used with \addplot

Consider the following MWE: \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis} \addplot+ [only marks, nodes near coords, point meta=explicit symbolic, ...
2
votes
1answer
405 views

Adjusting position of individual nodes in bar chart [duplicate]

The labeling of the bars is sometimes behind the error bar. Lifting them all isn't elegant but I haven't found a way to adjust the positions of the individual nodes. I included the third set of bars ...
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 ...
2
votes
1answer
257 views

Wrong alignment of “nodes near coords” with respect to the bars when some values are negatives

I have the following MWE: \documentclass[12pt]{article} \usepackage{pgfplots} \usepackage{pgfplotstable} \pgfplotsset{compat=newest} \usepackage{filecontents}% write data file to make make MWE self ...
2
votes
2answers
673 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,...
2
votes
1answer
286 views

Custom text nodes for labeling ybar stacked plot using nodes near coords

I am trying to duplicate this origin plot using pgfplots. So far, I have this My MWE is \documentclass[9pt]{beamer} \usepackage[T1,OT1]{fontenc} \usepackage[utf8]{inputenc} \setbeamerfont{normal ...
2
votes
1answer
3k views

pgfplots: I do not know the key '/tikz/nodes near coords' error [closed]

I'm trying to create a simple plot using pgfplots. I have a problem though that drives me crazy. I'm working on a debian installation and had installed the tex-live version from the repositories. The ...
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 ...
1
vote
1answer
3k views

Bold Y-Tick Label and Every Node Near Coord

I can make my xticklabel apply \bfseries, I can make my xlabel and ylabel apply \bfseries. For some reason, I cannot seem to get my yticklabel to apply this effect. At least when I compare the "1" ...
2
votes
1answer
2k 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....
2
votes
1answer
879 views

Changes in pfgplot barchart

I found many, many helpful things on tex.stackexchange for pgfplots - thanks for that! But i can't figure out how to: insert a new line after "without" or "with" hide value 0 or the whole bar change ...
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 ...
3
votes
1answer
291 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
1answer
827 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 ...
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 ...
1
vote
0answers
377 views

Bar plot with y-error and nodes near coords [closed]

I have to plot some data as a bar plot. These data is processed with pgfplotstable, so I can plot the mean and the error for my data. Now I want to print the nodes near coords for each of the bars; ...
2
votes
0answers
196 views

Stacked bargraph nodes near coords too bunched up vertically tikz [duplicate]

How do I center the coordinates in their bars vertically? This shows horizontally in ybar \documentclass[tikz,border=12pt]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{...
1
vote
0answers
95 views

Adding a symbol to nodes near coords in pgfplots [duplicate]

I'm currently making a bar plot with pgfplots and have numbers in percent on the x axis. I want to show the values directly at the bars for which I use nodes near coords. But because the values are ...
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=...
1
vote
1answer
424 views

Positioning y axis and node near coords

What I obtained: What I need: Operations needed: Positioning y axis on Zero Anchoring node near coords on the right side of the blue line The code I used is: \begin{filecontents*}{RR.dat} y x ...