Questions tagged [nodes-near-coords]

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

Filter by
Sorted by
Tagged with
2
votes
2answers
47 views

Draw a point with a label in a defined function PGF Plots

i would like to plot a function with PGF and also plot some points that belong to a function with a label. I defined the function and plotted it with this code: \begin{tikzpicture} [declare function = ...
1
vote
1answer
24 views

PGFPlots: Logarithmic scale with “linear” labels

I created a bar chart with a logarithmic x axis. The problem is: The labels for the bars are also logarithmic, e.g. 1.3 instead of 20. How can I get the real numbers as label? Thanks in advance. MWE: \...
1
vote
1answer
31 views

Using a pre-defined list inside a pgfplotset style

I would like to place defined markers on certain datapoints in a plot using a predefined list of tuples \def\datalist{datapoint/mark}. I found a suitable solution of the same problem with labels which ...
0
votes
1answer
71 views

Drawing histogram on a ruled graph sheet. Help me with this

I would like to draw this histogram (see the attached image) on a ruled graph sheet. So far, I have the MWE as follows: \documentclass[tikz,border=2mm]{standalone} \usepackage{pgfplots} \pgfplotsset{...
0
votes
1answer
90 views

PGFPlots: adding points and managing the labels

I want to draw following with Tikz/PGFplots: X = 0:12. Y = 0:30. \documentclass[10pt]{article} \usepackage{pgfplots} \pgfplotsset{compat=1.15} \usepackage{mathrsfs} \usepackage{float} \usetikzlibrary{...
1
vote
2answers
113 views

Nodes near coords formatting is incorrect when non-default sci formatting is specified

Upon showing some nodes near coords in my plots I stumbled upon a formatting issue related to the use of /pgf/number format/sci generic options. More specifically, when changing the default mantissa ...
1
vote
2answers
29 views

Problems when facing with bar chart val

I am having problems with the datapoint placement when viewed in the graph. I tried to place it vertically by either using (anchor=west) but that didn't work either. The first values under USE(DAN) ...
0
votes
1answer
73 views

How do I center column labels in a pgfplot bar chart?

I'm drawing a bar chart with pgfplots. I need to have the value of each column above the column itself, like this: Figure 1 but LaTeX centers it above the left side: Figure 2 I tried using nodes ...
1
vote
1answer
36 views

Problem with bar graphs

I need to do a graph with horizontal bars, that give the period of plantation of each Field i, i=1,...,10. I have the following code: \documentclass[12pt,fleqn]{article} \usepackage{a4wide} \...
1
vote
1answer
81 views

PGFPLOTs: Add tikz-coordinate to each coordinate of a addplot command

This is a follow up question to: PGFPLOTS: Drawings inside a bar of a barplot I created a stack bar plot with coordinates at the bars such that I can draw arrows and other stuff inside the bar ...
0
votes
1answer
83 views

PGFPLOTS: Drawings inside a bar of a barplot

I have the following problem with a xbar stacked plot. The plot consist of three datasets and I want to draw two arrows at the beginning and the end of the second data set to highlight that the ...
1
vote
1answer
32 views

Adding text to explicit meta node labels from table

I have some metadata in a table that I am including as bar labels in my plot. I would like to specify that these labels are timings, e.g., 15.8 secs. I don't know how to get the 'secs' text to be ...
2
votes
3answers
342 views

Custom data labels for each plot in bar chart

I have a simple bar chart, but I want the data labels to have a custom string value. For example, see the attached picture. I have found plenty of examples with plots, but nothing for bar charts. Note ...
1
vote
2answers
122 views

How to adjust elements of this bar chart?

I have the following MWE: \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.11, /pgfplots/ybar legend/.style={ /pgfplots/legend image code/.code={%...
1
vote
1answer
37 views

Place values from table centred within bars in a stacked bar chart

I would like to get the values from the the columns Cd, Cr, and Ni showing on their respective sections of the bars in the chart. I would like them to be aligned in the center of each section. I have ...
1
vote
1answer
27 views

Assing specific shifting values to yaxis tick labels and keeping 'apparent' separation distance

I want to make specific tick labels on yaxis to shift far enough so they do not overlap bars in a stacked bar chart, but also I would all labels to keep the same 'apparent' separation distance (this ...
1
vote
1answer
50 views

assign different anchoring to nodes with negative coordinates in bar chart addplot

I need to make nodes with negative coodinates be anchor=east. How can I do that when I have nodes near coords style = {anchor = west,..} before \addplot? Should I create an individual \addplot for ...
2
votes
1answer
215 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
44 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
125 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
157 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
347 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
334 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 ...
3
votes
2answers
227 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
61 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
247 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 ...
0
votes
1answer
232 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{...
1
vote
1answer
426 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 ...
2
votes
2answers
652 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 ...
0
votes
1answer
593 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
454 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
222 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
309 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
91 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
142 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}...
1
vote
1answer
147 views

add categorical xticklabels at specified position

I am trying to make a bar chart for categorical data, where each category has a score and the number of items in a category is represented by the width of the bar. Based on Bar chart from CSV file ...
0
votes
2answers
660 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 ...
1
vote
1answer
279 views

Summation values in stacked bar chart instead of increment

I have a stacked bar chart and I would like to have the summation values displayed instead of the increment. I have the following code: \documentclass[border=0mm]{standalone} \usepackage{pgfplots} \...
3
votes
3answers
595 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 ...
4
votes
2answers
756 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 ...
5
votes
2answers
167 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 (...
0
votes
2answers
1k 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} \...
2
votes
2answers
65 views

Horizontally align chart labels

This is a follow-up question of Labeling chart series with pgfplots. There I missed to mention that the labels inside the chart should be aligned horizontally above Metric 2 (i.e. horizontally ...
2
votes
2answers
1k 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 ...
2
votes
1answer
319 views

How can I plot a smooth line of fit through the following points and is there an easier way to plot (x,y) labels for each point?

\documentclass{standalone} \usepackage{pdfpages} \usepackage{tikz} \usepackage{pgfplots, pgfplotstable} \pgfplotsset{compat=1.12} \usepgfplotslibrary{fillbetween} \usepackage{amsmath} \...
2
votes
1answer
432 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 ...
3
votes
1answer
843 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 ...
2
votes
1answer
454 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 ...
1
vote
1answer
901 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 (...
8
votes
2answers
731 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%. -----------...