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
32 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". ...
user avatar
1 vote
1 answer
50 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 ...
user avatar
0 votes
1 answer
45 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[...
user avatar
  • 247
0 votes
0 answers
37 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 ...
user avatar
0 votes
2 answers
67 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 ...
user avatar
1 vote
1 answer
45 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 ...
user avatar
  • 115
1 vote
2 answers
114 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 ...
user avatar
  • 115
1 vote
2 answers
61 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" ...
user avatar
  • 51
1 vote
3 answers
56 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{...
user avatar
  • 207
1 vote
1 answer
41 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 ...
user avatar
1 vote
1 answer
78 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 ...
user avatar
1 vote
2 answers
239 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[...
user avatar
  • 1,536
2 votes
1 answer
81 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 ...
user avatar
  • 139
0 votes
2 answers
94 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 ...
user avatar
1 vote
1 answer
59 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. ...
user avatar
  • 65
2 votes
1 answer
63 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[...
user avatar
  • 65
1 vote
1 answer
132 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 ...
user avatar
1 vote
2 answers
130 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}[ ...
user avatar
  • 113
3 votes
2 answers
134 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 ...
user avatar
  • 85
2 votes
2 answers
67 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 = ...
user avatar
  • 21
1 vote
1 answer
70 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: \...
user avatar
1 vote
1 answer
49 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 ...
user avatar
  • 35
0 votes
1 answer
90 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{...
user avatar
0 votes
1 answer
196 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{...
user avatar
1 vote
2 answers
185 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 ...
user avatar
  • 8,429
1 vote
2 answers
38 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) ...
user avatar
  • 13
0 votes
1 answer
209 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 ...
user avatar
  • 601
1 vote
1 answer
39 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} \...
user avatar
1 vote
1 answer
282 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 ...
user avatar
0 votes
1 answer
117 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 ...
user avatar
1 vote
1 answer
39 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 ...
user avatar
  • 631
2 votes
3 answers
1k 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 ...
user avatar
1 vote
2 answers
131 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={%...
user avatar
  • 1,478
1 vote
1 answer
57 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 ...
user avatar
  • 105
1 vote
1 answer
32 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 ...
user avatar
  • 105
1 vote
1 answer
90 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 ...
user avatar
  • 105
2 votes
1 answer
533 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 ...
user avatar
  • 2,239
1 vote
1 answer
58 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]...
user avatar
1 vote
1 answer
243 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} \...
user avatar
  • 3,251
2 votes
1 answer
515 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: \...
user avatar
  • 21
3 votes
2 answers
571 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, ...
user avatar
  • 3,448
4 votes
3 answers
528 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 ...
user avatar
  • 4,865
3 votes
2 answers
370 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>...
user avatar
  • 7,801
1 vote
1 answer
102 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{...
user avatar
  • 422
1 vote
1 answer
449 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 ...
user avatar
  • 13
0 votes
1 answer
400 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{...
user avatar
1 vote
1 answer
608 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 ...
user avatar
2 votes
2 answers
1k 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 ...
user avatar
  • 8,759
0 votes
1 answer
847 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{...
user avatar
1 vote
2 answers
780 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 ...
user avatar