[pstricks] Smoothing Logistic Curves

Rich Shepard rshepard at appl-ecosys.com
Mon Oct 26 19:26:37 CET 2009

   Thanks to Michael Sharpe (for the PostScript code for logistic and
Gaussian curves) and Herbert Voss for fine-tuning the axes template code,
I'm much closer to achieving what I need, and understanding what I'm doing,

   The following code produces a nice S-curve (a logistic curve) over a large
domain on the x-axis. I assume that the jagged changes at the lower left and
upper right are the results of the asymptotic approach to the limits of the
y-axis. Is there a way to make the curve appear more smooth near the


\pst at addfams{pst-morefunc}
\define at key[psset]{pst-morefunc}{sigma}{\def\psk at sigma{#1 }\def
\psk at var{#1 #1 mul }}
\define at key[psset]{pst-morefunc}{var}{\def\psk at var{#1 }\def
\psk at sigma{#1 sqrt }}
\define at key[psset]{pst-morefunc}{mu}{\def\psk at mu{#1 }}
\define at key[psset]{pst-morefunc}{lscale}{\def\psk at lscale{#1 }}
\def\gaussfn{ Euler x \psk at mu sub dup mul 2 div \psk at var div neg exp }
\def\Scurve{1 1 Euler x \psk at mu sub \psk at lscale div neg exp add div } 
\def\Zcurve{Euler x \psk at mu sub \psk at lscale div neg exp dup 1 add div }
   yAxisLabel={Membership Grade ($\mu$)},yAxisLabelPos={-14,c}}


Richard B. Shepard, Ph.D.               |  Integrity            Credibility
Applied Ecosystem Services, Inc.        |            Innovation
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863

More information about the PSTricks mailing list