3

Using listplot, is there a way to cut off extra range data?

The option yEnd=10 simply removes the points above y=10 so that it changes the overall shape of the curve.

Here is example code:

\documentclass{article}
\usepackage{pst-plot}

\begin{document}

\def\data{0 0 1 4 1.5 1.75 2.25 4 2.75 7 3 9 3.5 13 4 15 4.5 15 5 1 5.5 1}
\begin{psgraph}(0,0)(6,10){10cm}{3cm}
\listplot[showpoints=true]{\data}
\end{psgraph}

\vspace*{20mm}

\begin{psgraph}(0,0)(6,10){10cm}{3cm}
\listplot[showpoints=true,yEnd=10]{\data}
\end{psgraph}

\end{document}
2
  • General comment: For vertical spacing, use ex instead of mm (and use em for horizontal spacing). The former is font dependent. Aug 9 '13 at 15:29
  • OK, thank you. Does somebody know how to make the result of the quoted code appear? (see here for example)
    – anderstood
    Aug 9 '13 at 15:48
2
\documentclass{article}
\usepackage{pst-plot}

\begin{document}

\def\data{0 0 1 4 1.5 1.75 2.25 4 2.75 7 3 9 3.5 13 4 15 4.5 15 5 1 5.5 1}
\begin{psgraph}[Dy=2](0,0)(6,10){10cm}{3cm}
\listplot[showpoints]{\data}
\end{psgraph}

\vspace*{20mm}    
\begin{psgraph}[Dy=2](0,0)(6,10){10cm}{3cm}
\psclip{\psframe[linestyle=none](-5pt,-5pt)(6,10)}
  \listplot[showpoints]{\data}
\endpsclip
\end{psgraph}

\end{document}
7
  • Why doesn't this code compile on LuaLaTeX but compiles well on XeLaTeX without any extra packages ?. What does XeLaTeX has which LuaLaTeX misses to compile a PSTricks code ? Aug 9 '13 at 21:23
  • Frequently done errors No4 at PSTricks.tug.org
    – user2478
    Aug 9 '13 at 21:27
  • Why cannot we have LuaLaTeX use the dvi -->pdf route like XeLaTeX to help PSTricks users and wont hurt any other users I suppose Aug 9 '13 at 21:31
  • lualatex --output-format=dvi ...
    – user2478
    Aug 9 '13 at 21:33
  • I mean direct path without an intermediate file/step like xelatex which uses xdvipdfmx i suppose Aug 9 '13 at 21:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.