Hallo zusammen,
ich will einen Node sehr nahe an die Koordinate positionieren, aber mit dem Befehl "right=0.1mm" komme ich mit kleiner werdenden Eingaben nicht näher an die Koordinate. Gibt es eine Möglichkeit den Node noch näher an den Punkt zu bekommen?
Node in Grafik positionieren Thema ist als GELÖST markiert
Node in Grafik positionieren
Re: Node in Grafik positionieren
Bitte zeige genau, was du machst und was dabei das Problem ist. Hilfe wird dadurch ggf. deutlich erleichtert.
Re: Node in Grafik positionieren
Sorry, vielleicht war die Beschreibung etwas ungenau...
Hier ist meine Grafik mit dem Problem:
\documentclass[border=2pt]{standalone} \usepackage{pgfplots}% lädt tikz, das graphicx lädt \pgfplotsset{compat=1.18} \usetikzlibrary{positioning} \usetikzlibrary{patterns} \begin{document} \begin{tikzpicture} \begin{loglogaxis}%[stack plots=y] %LLZO Fläche \addplot+ [ no marks, blue!50, mark size=2pt, mark options={ thick}, pattern=crosshatch dots, pattern color = blue!50, mark indices={1,2,3,4,5,8,9,10,11,12,13,14,15} ] coordinates { (530.1,26.5)(367,36.7) (187.6,46.89)(106,53.01)(57.9,57.9) (33,330) (24.2,242) (.1019,2.038)(.04061,.8123) (0.01624,0.6498) (.068229,.68229) (.11696,.58482) (.27616,.55233)(.48735,.48735)(293.6,7.339)(530.1,26.5) }; %LLZO Punkte LCO \addplot+ [ only marks, mark=x, color=blue, mark size=2pt, mark options={ thick}, mark indices={1,2,3,4,5,8,9,10,11,12,13,14,15} ] coordinates { (530.1,26.5)(367,36.7) (187.6,46.89)(106,53.01)(57.9,57.9) (33,330) (24.2,242) (.1019,2.038)(.04061,.8123) (0.01624,0.6498) (.068229,.68229) (.11696,.58482) (.27616,.55233)(.48735,.48735)(293.6,7.339)(530.1,26.5) }; %LLZO Punkte NMC 532 \addplot+ [ mark=star, mark indices={6,7}, mark size=2pt, mark options={ thick}, color = blue, only marks ] coordinates { (530.1,26.5)(367,36.7) (187.6,46.89)(106,53.01)(57.9,57.9) (33,330) (24.2,242) (.1019,2.038)(.04061,.8123) (0.01624,0.6498) (.068229,.68229) (.11696,.58482) (.27616,.55233)(.48735,.48735)(293.6,7.339)(530.1,26.5) }; \node [above right=0.1mm,font= \tiny] at (187.6,46.89){a}; \end{loglogaxis} \end{tikzpicture} \end{document}
Also am ende der \node befehl schreibt ein "a" an das Kreuz im Punkt (187.6,46.89). Das "a" sollte aber noch näher ran...
Vielen Dank schonmal!
Re: Node in Grafik positionieren
Habe die Lösung:
mit xshift=...mm funktioniert es!
Re: Node in Grafik positionieren
Jeder Node hat noch einen outer sep (default: halbe Linienbreite) und einen inner sep (default: 0,3333em). Die Abmessungen des Node und den Abstand des Textes zum Noderand kannst Du sehen, wenn Du die Option draw für den Node ergänzt:
\node [above right=0.1mm,font=\tiny, draw] at (187.6,46.89){a};
Du kannst inner sep für den Node aber auch verringern. Dann wird der Abstand des Textes zum Noderand geringer und damit steht der Text näher an der angegebenen Koordinate. Beispiel:
\node [above right=0.1mm,font=\tiny, inner sep=2pt] at (187.6,46.89){a};