Questions tagged [nodes-near-coords]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
21 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 ...
1
vote
2answers
62 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[...
2
votes
1answer
38 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 ...
0
votes
2answers
54 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 ...
1
vote
1answer
52 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. ...
2
votes
1answer
45 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[...
2
votes
1answer
48 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 ...
1
vote
2answers
38 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}[ ...
3
votes
2answers
97 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 ...
2
votes
2answers
54 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
33 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
35 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
73 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
112 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
136 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
33 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
92 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
116 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
88 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
35 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
727 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
130 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
44 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
28 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
64 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
320 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
47 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
162 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
251 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
441 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
390 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
276 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
69 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
337 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
299 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
486 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
788 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
682 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
580 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
261 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
369 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
103 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
178 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
159 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
851 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
309 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
677 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
854 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
170 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 (...