Skip to main content

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
1 answer
44 views

How do I get the text for a node from a data column?

I have a table with three columns. I am plotting a dot plot on two of the columns, and I want to sign the points from the top, taking the data from the first column (column with index 0) for the ...
sergiokapone's user avatar
  • 5,598
6 votes
1 answer
126 views

Problem with foreach loop in tikzpicture - undefined control sequence

I am puzzled by something in tikzpicture. Here is the problematic code that i shrinked to its minimum: \documentclass{article} \usepackage{tikz} \usepackage{xcolor} \usepackage{pgfplotstable} \...
Etienne's user avatar
  • 115
1 vote
1 answer
60 views

nodes near coords overrides only marks?

I'm trying to make a plot with labeled points and am seeing some strange behavior. I have \pgfplotsset{every axis plot/.style={no markers, thick}} at the start of my document. If I make a plot with ...
Janet's user avatar
  • 421
3 votes
1 answer
93 views

Change color of nodes near coords based on value

I have this matrix plot: \documentclass[tikz]{standalone} \usepackage{pgfplots, filecontents} \begin{document} \begin{tikzpicture} \begin{axis}[enlargelimits=false] \addplot [ matrix plot, nodes near ...
ValenStein's user avatar
1 vote
1 answer
81 views

How to specify the position of nodes with captions in a plot generated by pgfplots?

My question is how to specify the position of node in a plot? Here's a MWE: \begin{figure} \begin{tikzpicture} \begin{axis}[ xlabel=X (\%), ylabel=Y (\%), legend style={...
pvti's user avatar
  • 135
1 vote
1 answer
91 views

Inserting labels for the points in a curve

I tried to add some labels for each point in the following sample plot (that is one of the examples in Overleaf.) the labels similar to what is done in these answers. The reason that I chose this ...
Questioner's user avatar
0 votes
1 answer
63 views

Values on the bar-charts are crossing the grid

I am trying to put the values inside the grid for the charts, but as you can see from the output below, the values for data points cross the boundary (both left and right sides). My output: Latex ...
Student's user avatar
  • 197
0 votes
1 answer
74 views

Reduce gaps between groups of bars and resize the bar values for each bar

I am trying to reduce the space between the bars and also reduce the space between the values and their bars. As you can see from the figure below, the values of the bars cross the figure boundary. My ...
Student's user avatar
  • 197
0 votes
1 answer
95 views

Show 0 when printing nodes near coords in chart bar

Problem description: I would like for all values including 0 to be shown above bars in a chart bar. As I am new to latex, I assume something is set in nodes near coords that prevents 0 from showing. ...
sabina gorenc's user avatar
1 vote
1 answer
91 views

pgfplots with nodes near coords fails for some symbolic coords

I have made a plot with pgfplots where the symbolic coords contain special characters input via \texttt. When I enable nodes near coords, LaTeX chokes on these special characters. \documentclass{...
Michael F's user avatar
0 votes
2 answers
85 views

How to move percentage numbers in bar chart horizontally?

I want to to move the percentage numbers in horizontal direction so they don't overlap: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \begin{document} \pgfplotsset{testbar2/...
Friedrich Falkner's user avatar
0 votes
1 answer
227 views

Adjusting the overlapping percentage numbers in a bar chart

I want to achieve that the percentage numbers don't overlap like in the diagramm of this example (Link to Example) So the numbers should be in a space between A and B (preferably respectively ahead of ...
Friedrich Falkner's user avatar
0 votes
1 answer
59 views

pgfplots, ybar stacked, node near coords using texts instead of values

I created this graph, but in the colored areas, I want to put the legend text instead of the coordinate value, e.g. for the first blue bar, it should be "head" instead of "21.6". ...
guckmalmensch's user avatar
1 vote
1 answer
378 views

pgfplots nodes near coords with error bar

I am working on a horizontal bar plot with error bars. In addition I'd like to place the actual value of each bar with nodes near coords in the plot. However they tend to overlap with the positive ...
E. Thienhaus's user avatar
0 votes
1 answer
232 views

Change nodes near coords value to symbolic y value

I want to have label each bar of a horizontal bar chart with its corresponding y value. However, I am only able to get the numeric representation but not the actual symbolic value. \documentclass[...
Sim's user avatar
  • 240
0 votes
0 answers
40 views

Delete Nodes of Values smaller than 1000 in stacked bar chart [duplicate]

I would like to delete the labels of all the values, which are smaller than 1000, because they can't be seen correctly. I searched for a long time and I think there were some similar questions, but ...
Hello3456's user avatar
0 votes
2 answers
98 views

Centering rotated bar chart value

Using the following bar chart one can see that the label isn't really centered over the bar but placed more on the right. How can I center the value? The alignment has to be like that (rotated and ...
plategt's user avatar
1 vote
1 answer
228 views

Hiding 0 values from nodes within a bar graph

Is it possible to hide the 0 values from appearing when I have node near coords active? even better if I could hide the bar graphs for those specific 0 values. I tried using nodes near coords=y ...
Freon's user avatar
  • 127
1 vote
2 answers
738 views

latex bar chart values are overlapped. If I rotate, then looks weird

I have bar charts that compare computation time of algorithms. The value above each bar represent the time and because they are bigger than they should be, some values are overlapped to graph or ...
Q123's user avatar
  • 119
1 vote
2 answers
90 views

Pgfplots: nodes near coords throws "Undefined control sequence" error

I am trying to plot a bar chart using tikz. I am struggling with placing numbers above the bars. I use the "nodes near coords" option but I always get "undefinded control sequence" ...
swageta's user avatar
  • 71
1 vote
3 answers
66 views

Why are my circles off-center?

\usepackage[all]{xy} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[nodes near coords={(\coordindex)}] \addplot[draw=none] coordinates { (1,2) (2,1) (2,3) (3.7, 2) }; \end{...
cheyne's user avatar
  • 207
1 vote
1 answer
47 views

Labels near coordinates using Tikz

I searched for over2 hours now and did not find a way to get my labels next to my coordinates. I want to have A and B next to my marks, but ******** - it simply does not work and I am too dumb to ...
Dithiolen's user avatar
1 vote
1 answer
361 views

Omit zeros before the decimal point when printing coordinates near nodes in pgfplots

I would like to omit leading zeroes (i.e. before the decimal point) to have the numbers avoid overlap. It would also satisfy APA style, since the values fall always in the range of [0-1]. This is what ...
Heijmaaans's user avatar
3 votes
2 answers
909 views

How to conditionally specify the options for nodes near coords in pgfplots?

Now I'm plotting some ybar figures using pgfplots. I want to show the values on the ybar. However, some values are too small and I don't want to show them. The following is an example \documentclass[...
Ice0cean's user avatar
  • 1,646
2 votes
1 answer
249 views

Overlapping of labels in the markers of a chart line

I have created a chart line with two plot and enable the mark label using nodes near coords, but I get the overlapping labels as shown in the following figure: How can I fix this? is there a way that ...
affernan's user avatar
  • 189
0 votes
2 answers
335 views

Bar graph showing timeout (go off the page)

I'm trying to make a bar plot showing the runtime of some programs and I would like to have some of the bar plots run off the top of the page. Currently, I do this by setting the values of the bars to ...
user137789's user avatar
1 vote
1 answer
193 views

Making all bar labels appear above bar and not use scientific notation

Currently all the labels in my bar chart are not appearing above the bars and I'm not sure why. Also, the labels seem to automatically use scientific notation which I don't know how to change either. ...
texstar's user avatar
  • 65
2 votes
1 answer
795 views

Adding labels to bar chart

I am trying to add labels on top of the bars in my graph but it is not working. I want it to be the y-value that shows up but instead its numbering the bars. This is my code so far: \documentclass[...
texstar's user avatar
  • 65
1 vote
1 answer
1k views

How to show co-ordinates of all points in a plot using pgfPlots? [duplicate]

I'd like to show the co-ordinates of all the points which have been used for plotting a curve. For this I have created individual nodes for all points manually, is there a better way to do this? I've ...
YourPalNurav's user avatar
1 vote
2 answers
1k views

pgfplots: nodes near coords placement

I have bar chart where my node labels are overflowing. What is the best way to solve this? \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ ...
Oliver's user avatar
  • 113
3 votes
2 answers
207 views

Partition Triangle

I am working on a paper on integer partitions and I want to add something like this. This is not my picture, it is from another paper, but is it possible to do this on LaTex? I want to be able to ...
Lewis's user avatar
  • 85
3 votes
2 answers
621 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 = ...
Andrew's user avatar
  • 31
1 vote
1 answer
341 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: \...
anonymus1994.1's user avatar
1 vote
1 answer
58 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 ...
fafroo's user avatar
  • 35
0 votes
1 answer
146 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{...
Chika Odiliobi's user avatar
0 votes
1 answer
1k 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{...
Kuroi Ryū's user avatar
1 vote
2 answers
272 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 ...
BambOo's user avatar
  • 8,841
1 vote
2 answers
42 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) ...
Deborah's user avatar
  • 13
0 votes
1 answer
650 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 ...
Ntakwetet's user avatar
  • 631
1 vote
1 answer
49 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} \...
Angelo Aliano Filho's user avatar
2 votes
1 answer
742 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 ...
M.K. aka Grisu's user avatar
0 votes
1 answer
215 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 ...
M.K. aka Grisu's user avatar
1 vote
1 answer
114 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 ...
tgkolda's user avatar
  • 758
2 votes
3 answers
2k 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 ...
Sina Madani's user avatar
1 vote
2 answers
140 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={%...
Thev's user avatar
  • 1,578
1 vote
1 answer
85 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 ...
Emmo03's user avatar
  • 105
1 vote
1 answer
45 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 ...
Emmo03's user avatar
  • 105
1 vote
1 answer
223 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 ...
Emmo03's user avatar
  • 105
2 votes
1 answer
1k 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 ...
hengxin's user avatar
  • 2,391
1 vote
1 answer
274 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]...
Martin Clouthier's user avatar