Daten zoomen mit pscustom und listplot
Hallo zusammen,
ich möchte Daten in einem Graph darstellen. Dazu möchte ich einen bestimmten Ausschnitt noch genauer heranzoomen. Nun stehe ich aber beim heranzoomen an.
Die Daten sollten dann formatmässig genau gleich wie im "Original" dargestellt werden. Zusätlich möchte ich auch wieder die Achsen mit \psaxes einblenden.
Das Problem ist, dass wenn ich in der \pscustom Umgebung die Achsen einblende, zwei Fehler auftreten (unterhalb des Minimalbeispiels). Zudem wird der Ausschnitt der Daten nicht mit dem entsprechenden Offset dargestellt.
Könnt ihr mir weiterhelfen?
Viele Grüsse
Finntheone
Code:
\documentclass[a4paper]{scrreprt}
\usepackage[dvipsnames, pologue]{pstricks}
\usepackage{pst-plot}
\usepackage{filecontents}
\begin{filecontents*}{data1.dat}
0 420 0.1 750 0.2 755 0.3 745 3.5 760 3.6 740 3.7 742 3.8 748 3.9 751 4.0 753 4.1 755 4.2 748 4.3 756 4.4 750 4.5 752 4.6 756 4.7 758 4.8 759 4.9 746 5.0 761
\end{filecontents*}
\begin{filecontents*}{dataII.dat}
0 422 0.1 754 0.2 758 0.3 740 3.5 752 3.6 748 3.7 746 3.8 744 3.9 755 4.0 757 4.1 745 4.2 749 4.3 750 4.4 752 4.5 758 4.6 744 4.7 753 4.8 755 4.9 749 5.0 752
\end{filecontents*}
\begin{document}
\psset{xunit=2.06cm,yunit=0.02cm}
\begin{pspicture}(-0.45,370)(6.0,850)
\readdata{\data}{data1.dat}
\readdata{\dataII}{dataII.dat}
\listplot[showpoints, plotstyle=line, linecolor=red]{\data}
\listplot[showpoints, dotstyle=SolidTriangle, plotstyle=line, linecolor=blue]{\dataII}
\psaxes[Oy=400,Dx=0.5,Dy=50]{->}(0,400)(5.5,825)
\rput[lb](1,500){%
\pscustom[xunit=1cm, yunit=0.01cm]{
\listplot[showpoints, plotstyle=line, linecolor=red, xStart=3.6, xEnd=4.9]{\data}
\listplot[showpoints, dotstyle=SolidTriangle, plotstyle=line, linecolor=blue, xStart=3.6, xEnd=4.9]{\dataII}
\psaxes[Ox=4, Oy=725,Dx=0.5, Dy=25]{->}(4,725)(5.5,775)
}
}
\end{pspicture}
\end{document}
Fehler:
Code:
! Misplaced special graphics object command.
\@pstrickserr ... immediate help.}\errmessage {#1}
\endgroup
l.37 }
Your command was ignored. Will recover best I can.
Type <return> to procede.
PSTricks error. See User's Guide for further information.
Type H <return> for immediate help.
! Misplaced special graphics object command.
\@pstrickserr ... immediate help.}\errmessage {#1}
\endgroup
l.37 }
Your command was ignored. Will recover best I can.
Type <return> to procede.
Problem liegt hauptsächlich an psaxes
Mittlerweile habe ich herausgefunden, dass das Problem eigentlich ausschliesslich an psaxes liegt. Irgendwie können keine Koordinatenachsen in der pscustom umgebung gezeichnet werden. Weiss irgendjemand Rat? Zudem werden in der pscustom-Umgebung die Datenpunkte nicht dargestellt. Ich kann die Option showpoints sowohl in pscustom als auch in listplot ohne Erfolg einfügen.
Angepasstes Minimalbeispiel:
Code:
\documentclass[a4paper]{scrreprt}
\usepackage[dvipsnames, pologue]{pstricks}
\usepackage{pst-plot}
\usepackage{filecontents}
\begin{filecontents*}{data1.dat}
0 420 0.1 750 0.2 755 0.3 745 3.5 760 3.6 740 3.7 742 3.8 748 3.9 751 4.0 753 4.1 755 4.2 748 4.3 756 4.4 750 4.5 752 4.6 756 4.7 758 4.8 759 4.9 746 5.0 761
\end{filecontents*}
\begin{filecontents*}{dataII.dat}
0 422 0.1 754 0.2 758 0.3 740 3.5 752 3.6 748 3.7 746 3.8 744 3.9 755 4.0 757 4.1 745 4.2 749 4.3 750 4.4 752 4.5 758 4.6 744 4.7 753 4.8 755 4.9 749 5.0 752
\end{filecontents*}
\begin{document}
\psset{xunit=2.06cm,yunit=0.02cm}
\begin{pspicture}(-0.45,370)(6.0,850)
\readdata{\data}{data1.dat}
\readdata{\dataII}{dataII.dat}
\listplot[showpoints, plotstyle=line, linecolor=red]{\data}
\listplot[showpoints, dotstyle=SolidTriangle, plotstyle=line, linecolor=blue]{\dataII}
\psaxes[Oy=400,Dx=0.5,Dy=50]{->}(0,400)(5.5,825)
\rput[lb](-8,-3200){%
\pscustom[xunit=5cm, yunit=0.1cm, showpoints, plotstyle=line, linecolor=red]{
\listplot[showpoints, xStart=3.6, xEnd=4.9]{\data}
}
\pscustom[xunit=5cm, yunit=0.1cm, showpoints, plotstyle=line, linecolor=blue]{
\listplot[showpoints, dotstyle=SolidTriangle, xStart=3.6, xEnd=4.9]{\dataII}
}
\pscustom[xunit=5cm, yunit=0.1cm]{
%\psaxes[Ox=4, Oy=725,Dx=0.5, Dy=25]{->}(4,725)(5.5,775)
}
}
\end{pspicture}
\end{document}
Grüsse
Finntheone