So entfernen Sie Markierungen aus einer Grafik, die mit einer CSV-Datei erstellt wurde

So entfernen Sie Markierungen aus einer Grafik, die mit einer CSV-Datei erstellt wurde

Ich importiere eine CSV-Datei und möchte die Markierungen aus der Grafik entfernen. Wie mache ich das?

\documentclass{minimal}
\usepackage{pgfplots}
\usepgfplotslibrary{dateplot}

%\usepackage{filecontents}% Commented out dataCL.csv is not overwriten.
\begin{filecontents*}{dataCL.csv}
    x, y
    1, 10
    2, 15
    3, 17
\end{filecontents*}

\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot table [mark = none, draw = none,col sep=comma,x=x, y=y] {dataCL.csv};
\end{axis}
asdfasdfasdfasd
\end{tikzpicture}
\end{document}

Antwort1

mark=noneist eine Option zu \addplot/ \addplot+, nicht zu table. Übrigens sollten Sie only marksanstelle von verwenden draw=none. Anbei finden Sie ein Beispiel, bei dem das erste Diagramm nur eine Linie und das zweite nur Markierungen hat.

\documentclass{article}
\usepackage{pgfplots}

\usepackage{filecontents}% Commented out dataCL.csv is not overwriten.
\begin{filecontents*}{dataCL.csv}
    x, y
    1, 10
    2, 15
    3, 17
\end{filecontents*}

\begin{document}
\begin{tikzpicture}
\begin{axis}
    \addplot+ [mark=none] table [col sep=comma, x=x, y=y] {dataCL.csv};
    \addplot+ [only marks] table [col sep=comma, x=x, y=y] {dataCL.csv};
\end{axis}
\end{tikzpicture}
\end{document}

verwandte Informationen