[pstricks] plotstyle=line

Poul Riis Poul.Riis at skolekom.dk
Mon Jan 24 08:48:28 CET 2011


I don't understand why plotstyle=line doesn't work in the example below -
it works with plotstyle=curve.

Poul Riis



\documentclass[11pt,a4paper,oneside]{article}
\usepackage[ansinew]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{geometry}
\usepackage{pstricks-add}

\topmargin=-1cm
\textheight=25cm

\begin{document}
\begin{center}
\psset{xunit=10mm,yunit=5mm}
\begin{pspicture}(-1,-5)(10,5)
\psaxes[Dx=1,ticksize=-3pt 0]{->}(0,0)(0,-5)(10,5)
\pstVerb{/u0 5 def /frekv 0.25 def /tau 0.8 def /tangens {dup sin exch cos
div} def /cotangens {dup cos exch sin div} def /firkant {180 mul frekv mul
tangens dup 1 atan exch 1 exch atan add 2 mul 180 div 3 sub 2 div} def
/savtak {360 mul frekv mul cotangens 1 exch atan 360 div neg 0.25 add
frekv div neg 1 add} def /afladning {tau div neg 2.71828185 exch exp 2 mul
2 tau mul frekv mul 1 exch div neg 2.718285 exch exp 1 add div 1 sub u0
mul} def /signal {dup savtak afladning exch firkant mul} def}
\psplot[plotstyle=line,linecolor=blue,plotpoints=500]{0.0123}{10.0123}{x
firkant u0 mul neg}% Does not work!?
%\psplot[plotstyle=curve,linecolor=blue,plotpoints=500]{0.0123}{10.0123}{x
firkant u0 mul neg}% Works!
\psplot[plotstyle=curve,linecolor=red,plotpoints=500]{0.0123}{10.0123}{x
signal}
\uput{3pt}[270](9.75,0){$t$ /\text{ms}}
\uput{3pt}[0](0,4.5){$u(t)$ /\text{V}}
\end{pspicture}
\end{center}
\end{document}


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20110124/39e3042a/attachment.html>


More information about the PSTricks mailing list