ich habe eine .csv-Datei, in der Daten vorhanden sind, die ich auslesen und plotten möchte. Hier mein Minimalbeispiel:
\documentclass[paper=a4,12pt,version=last]{scrartcl} \usepackage{pgfplots} \pgfplotsset{compat = newest} \usepgfplotslibrary{units} \begin{document} \begin{tikzpicture} \begin{loglogaxis}[ y filter/.code={\ifstr{#1}{}{\pgfmathparse{0.1}}{}}, xlabel=Systemteifigkeit,x unit=N/m, ylabel=Kritische Drehzahlen,y unit=U/min, xmin=10^2, xmax=10^17, ymin=10^0, ymax=10^5, legend style={ at={(0.5,-0.25)}, anchor=north, legend columns=1, cells={anchor=west}, font=\footnotesize, rounded corners=2pt, }, cycle list name=color list ] \pgfplotstableread[col sep=comma,skip first n=6]{crm.txt}\datatable \addplot+[smooth] table[x=P1,y=P20] from \datatable ; \addplot+[smooth] table[x=P1,y=P24] from \datatable ; \addplot+[cyan](10^3,2040)--(10^16,2040); \legend{Mode 1 (Volumen), Mode 2 (Volumen, Mode 1 (Balken), Mode 2 (Balken), Nenndrehzahl} \end{loglogaxis} \end{tikzpicture} \end{document}
Vielen Dank im Voraus und viele Grüße.
PS: Konnte die .csv nicht hochladen, habe sie in .txt umbenannt. Das Minimalbeispiel geändert und getestet.