[pstricks] stepcurve

Herbert Voss Herbert.Voss at FU-Berlin.DE
Wed May 28 22:34:46 CEST 2008


Doris Wagner schrieb:

> I'm trying to plot a stepcurve to illustrate an approximation. for  
> example, I  want to have 10 steps, each 1 cm wide. I tried this:
> 
> \psplot[plotpoints=10,barwidth=1cm]{0}{10}{1.1 x exp}
> 
> 
> this looks good, but: I want the bars not to be centered at the  
> function-points, but at the left or right of them.
> And I'd like to have no vertical lines between the bars, only the  
> first left and the last right one.

\documentclass[12pt,a4paper]{article}
\usepackage{pstricks-add}
\begin{document}

\pspicture(10.5,3.5)
\psStep[StepType=upper](0,10){10}{1.1 x exp}
\multido{\iA=1+1}{9}{%
   \psline[linecolor=white](\iA,0)(! \iA\space dup 1.1 exch exp)}
\psaxes{->}(10.5,3.5)
\endpspicture

\end{document}

Herbert



More information about the PSTricks mailing list