problem mit \fileplot

Tabellen und Grafiken erstellen und anordnen


stefa

problem mit \fileplot

Beitrag von stefa »

ich habe ein problem, ich habe dieses datei verfasst
\documentclass[12 pt]{article}
\usepackage{amssymb,amsthm,amsmath, pstricks, pst-node, pst-tree,pst-plot, pstricks-add, pgfplots,filecontents, graphicx}  
\begin{document}


This should be the graph

\begin{figure}[!htb]
      \centering
      \psset{llx=-1.2cm,lly=-1cm,xAxisLabel={$N$},xAxisLabelPos={c,-8},yAxisLabel={$c(N)$},yAxisLabelPos={-50,c}}
      \begin{psgraph}[Dx=100,Dy=5](0,0)(400,60){10cm}{7cm}
        \fileplot[plotstyle=curve,showpoints=true]{cN.txt}
      \end{psgraph}
      \caption{This is the graph of $c(N)$}
    \end{figure}
    
    
does it work?

\end{document}
und es gibt dieses datei cN.txt in dem gleichen folder
10.0000      4.4063
    20.0000      7.9144
    30.0000    10.7714
    40.0000    13.3236
ich bekomme als error message
! File ended while scanning use of \pst@@@altreadfile

was ist falsch?
danke!

Benutzeravatar
localghost
Forum-Meister
Forum-Meister
Beiträge: 826
Registriert: Di 8. Jul 2008, 15:40
Wohnort: Braunschweig

Unzulässige Optionen

Beitrag von localghost »

Laut Abschnitt 2 der Anleitung zu pst-plot gibst Du unzulässige Option für \fileplot an.
\documentclass[11pt]{article}
\usepackage{pst-plot,pstricks-add}
\usepackage{filecontents}
\begin{filecontents*}{cN.txt}
10 4.4063
20 7.9144
30 10.7714
40 13.3236 
\end{filecontents*}

\begin{document}
  This should be the graph.

  \begin{figure}[!htb]
    \centering
    \psset{llx=-1.2cm,lly=-1cm,xAxisLabel={$N$},xAxisLabelPos={c,-2},yAxisLabel={$c(N)$},yAxisLabelPos={-4,c}}
    \begin{psgraph}[Dx=10,Dy=5](0,0)(40,15){10cm}{7cm}
      \fileplot[plotstyle=line]{cN.txt}
    \end{psgraph}
    \caption{This is the graph of $c(N)$}
  \end{figure}
 
  Does it work?
\end{document}

Thorsten
TeX und LaTeX, Fragen und Antworten – TeXwelt

¹ Es tut mir Leid. Meine Antworten sind begrenzt. Sie müssen die richtigen Fragen stellen.
² System: TeX Live 2024, TeXworks

Antworten