ich nutze pgfplots zusammen mit tikzpicture, um meine Plots zu erstellen. Hier der Code:
\documentclass{article} % TikZ & PGF-Plots \usepackage{tikz} \usetikzlibrary{external} \tikzexternalize[prefix=tikz/,optimize command away=\includepdf] \usepackage{pgfplots} \pgfplotsset{compat=1.18} \begin{document} \begin{figure}[ht] \centering \begin{tikzpicture} \pgfplotsset{ width=10cm, % Breite height=8cm, % Höhe scale only axis, xmin=10, xmax=120, xtick={10, 20, ..., 120}, % Skalierung x-Achse xtick pos=bottom, % Ticks nur unten auf der x-Achse xtick align=outside, % Ticks zeigen nach innen xlabel={x-Achse}, % Beschriftung x-Achse } \begin{axis}[ axis y line*=left, % y-Achse links ylabel={y-Achse}, % Beschriftung y-Achse ymin=-50, ymax=80, % Wertebereich y-Achse ytick=\empty, % keine Markierungen auf y-Achse ] % Fresh \addplot table[y=y1, y expr=\thisrow{y1}/2] {data/xrd.txt}; % 60 °C \addplot table[y=y2, y expr=\thisrow{y2} + 20] {data/xrd.txt}; % 70 °C \addplot table[y=y3, y expr=\thisrow{y3} + 40] {data/xrd.txt}; % 80 °C \addplot table[y=y4, y expr=\thisrow{y4} + 60] {data/xrd.txt}; \end{axis} \begin{axis}[ axis y line*=right, % y-Achse rechts axis x line=none, % keine x-Achse ymin=-250, ymax=3500, % Wertebereich y-Achse ytick=\empty, % keine Markierungen auf y-Achse ] % Ref \addplot[only marks, mark size=0.5pt] table {data/xrd_ref.txt}; \end{axis} \end{tikzpicture} \end{figure} \end{document}
\addplot table {data/<name>.txt};
\begin{axis}[ axis y line*=right, % y-Achse rechts axis x line=none, % keine x-Achse ymin=-250, ymax=3500, % Wertebereich y-Achse ytick=\empty, % keine Markierungen auf y-Achse ] % Ref \addplot[only marks, mark size=0.5pt] table {data/xrd_ref.txt}; \end{axis}
Frage: Wie kann ich von jedem dieser Punkte (x, y) eine senkrechte Linie nach unten bis zur x-Achse (x=0) zeichnen?
Wäre über Hilfe sehr dankbar!
Anbei noch die PDF-Ausgabe des bisherigen Plots, es geht um die schwarzen marks, von denen aus ich die Striche nach unten zeichnen möchte.