[pstricks] Re: pstricks Digest, Vol 39, Issue 13

J.P.Valencia pvalen at naima.udea.edu.co
Tue Apr 18 11:40:17 CEST 2006


On Monday 17 April 2006 05:00, pstricks-request at tug.org wrote:
> Send pstricks mailing list submissions to
> 	pstricks at tug.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://tug.org/mailman/listinfo/pstricks
> or, via email, send a message with subject or body 'help' to
> 	pstricks-request at tug.org
>
> You can reach the person managing the list at
> 	pstricks-owner at tug.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of pstricks digest..."
>
>
> Today's Topics:
>
>    1. [Fwd: Re: binom_distribution] (Herbert Voss)
>    2. oval - backgrnd color (Balagurusamy)
>    3. Re: oval - backgrnd color (na199 at gmx.de)
>    4. Re: [Fwd: Re: binom_distribution] (Poul Riis)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sun, 16 Apr 2006 14:11:56 +0200
> From: Herbert Voss <Herbert.Voss at alumni.TU-Berlin.DE>
> Subject: [pstricks] [Fwd: Re: binom_distribution]
> To: LaTeX Lists <pstricks at tug.org>
> Message-ID: <4442348C.1070803 at alumni.TU-Berlin.DE>
> Content-Type: text/plain; charset=us-ascii; format=flowed
>
> -------- Original Message --------
> Subject: Re: binom_distribution
> Date: Sun, 16 Apr 2006 13:28:23 +0200
> From: Herbert Voss <Herbert.Voss at gmx.net>
> Newsgroups: comp.text.tex
> References: <Oud0g.25228$7a.4617 at pd7tw1no>
>
> John Campbell wrote:
> > Sorry if this a FAQ, but is there an simple way to use ps-plot to make a
> > binomial distribution, or should I just get the data, and use multido?
>
> here is a PSTricks solution which gives this output:
> http://perce.de/temp/binom.pdf
> If it really helps, I'll put into pst-func.
>
> Herbert
>
>
>
> \documentclass[12pt]{article}%
> \usepackage{pstricks}%
> \usepackage{pst-func}%
> %
> \makeatletter
> \def\psBinom{\pst at object{psBinom}}
> \def\psBinom at i#1{%
>    \begin at SpecialObj%
>    \addto at pscode{
>      /scx { \pst at number\psxunit mul } def
>      /scy { \pst at number\psyunit mul } def
>      /BinScale { scy 2 N exp div exch N div scx exch } def
>      /N #1 def
>      /Y 1 def
>      0 0 moveto
>      /kOld 0 def
>      1 1 N {
>        /k exch def
>        /Y Y N k sub 1 add mul k div def
>        kOld Y BinScale L k Y BinScale L
>        \ifPst at markZeros k 0 BinScale L \fi
>        /kOld k def
>      } for
>    stroke
>    }%
>    \end at SpecialObj%
> }
> \makeatother
>
> \begin{document}
>
> \psset{yunit=30,xunit=15}
> \begin{pspicture}(1,.25)
> \psaxes[Dx=0.1,dx=0.1\psxunit,Dy=0.05,dy=0.05\psyunit]{-|}(1,.25)
> \psBinom[markZeros]{9}% option defined in pst-func
> \psset{linewidth=1pt}
> \psBinom[linecolor=green]{25}
> \psBinom[linecolor=blue]{50}
> \psBinom[linecolor=red]{100}
> \end{pspicture}
>
> \end{document}
>
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Sun, 16 Apr 2006 08:35:48 -0700 (PDT)
> From: Balagurusamy <latexbala at yahoo.com>
> Subject: [pstricks] oval - backgrnd color
> To: pstricks at tug.org
> Message-ID: <20060416153548.86045.qmail at web33710.mail.mud.yahoo.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> hello sir im struggle with one problem that
>
>   i need oval box text with background color across with pagebreak
>
>   what should i do?
>
>   pls advise me
>
>   thanks
>
> ---------------------------------
> Love cheap thrills? Enjoy PC-to-Phone  calls to 30+ countries for just
> 2¢/min with Yahoo! Messenger with Voice. -------------- next part
> --------------
> An HTML attachment was scrubbed...
> URL:
> http://tug.org/pipermail/pstricks/attachments/20060416/97415edb/attachment-
>0001.htm
>
> ------------------------------
>
> Message: 3
> Date: Sun, 16 Apr 2006 19:54:28 +0200
> From: na199 at gmx.de
> Subject: Re: [pstricks] oval - backgrnd color
> To: Graphics with PSTricks <pstricks at tug.org>
> Message-ID: <4442A0F4.21064.312B9EB at localhost>
> Content-Type: text/plain; charset=ISO-8859-1
>
> You did not elaborate, but I guess you should make your oval box twice and
> use the psclip.. endpsclip for cutting away the unwanted portions  on the
> respective page. Not difficult. It's described even in the old manual
> (1993) for pstricks.
>
> Henning Heinze
>
> > hello sir im struggle with one problem that
> >
> >   i need oval box text with background color across with pagebreak
> >
> >   what should i do?
> >
> >   pls advise me
> >
> >   thanks
> >
> > ---------------------------------
> > Love cheap thrills? Enjoy PC-to-Phone  calls to 30+ countries for just
> > 2¢/min with Yahoo! Messenger with Voice.
>
> ------------------------------
>
> Message: 4
> Date: Mon, 17 Apr 2006 10:22:30 +0200
> From: "Poul Riis" <Poul.Riis at skolekom.dk>
> Subject: Re: [pstricks] [Fwd: Re: binom_distribution]
> To: "Graphics with PSTricks" <pstricks at tug.org>
> Message-ID: <fc.000f47bd1d4ef8673b9aca0038fbb811.1d4efaa8 at skolekom.dk>
> Content-Type: text/plain; charset="iso-8859-1"
>
> To my knowledge a binomial distribution is defined for integral values
> only.
> I don't fully understand why the following seems to work...
> - And furthermore, I don't understand why it doesn't work for all values
> of n and p!?
> Who can improve it?
>
> Yours,
> Poul Riis
>
>
>
> \documentclass[a4paper,12pt]{article}
> \usepackage{pstricks-add}
> \usepackage{pst-func}
> \usepackage{multido}
> \pagestyle{empty}
>
> \newcommand{\binomialdistr}[2]{%
> \pstVerb{%
> /nn #1 def%
> /pp #2 def%
> /prob 1 pp sub nn exp def%
> }%
> \psset{xunit=1cm,yunit=5cm}%
> \begin{pspicture}(0,0)(#1,1)%
> \SpecialCoor%
> \psaxes[ticksize=-2pt 0,Dy=0.1]{->}(0,0)(0,0)(#1,1)%
> \psline[linecolor=red,linewidth=3pt](!0 0)(!0 prob)%
> \uput[90]{90}(!0
> prob){\psPrintValue[valuewidth=10,fontscale=8,linecolor=blue]{prob}}%
> \multido{\nj=0+1}{#1}{%
> \pstVerb{%
> /probold prob def%
> /prob pp 1 pp sub div nn \nj\space sub mul \nj\space 1 add div probold mul
> def%
> }%
> \psline[linecolor=red,linewidth=3pt](!\nj\space 1 add 0)(!\nj\space 1 add
> prob)%
> \uput[90]{90}(!\nj\space 1 add
> prob){\psPrintValue[valuewidth=10,fontscale=8,linecolor=blue]{prob}}%
> }%
> \end{pspicture}%
> }%
>
> \begin{document}
> Binomial distribution with pstricks....\\[1cm]
> \binomialdistr{6}{0.4}
> \end{document}
>
> -------------- next part --------------
>
>
> ###########################################
> Denne meddelelse med evt. vedlæg  er scannet af SkoleKom ved hjælp af
> F-Secure virusscanner.
>
> Meddelelsen kan læses sikkert. Det kán i sjældne tilfælde være kritisk at
> hente vedlæg. Kontakt din systemadministrator, hvis du er i tvivl.
>
> For yderligere information,
> http://forside.skolekom.dk/indhold/punkt1/viruspolitik
>
> ------------------------------
>
> _______________________________________________
> pstricks mailing list
> pstricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
>
>
> End of pstricks Digest, Vol 39, Issue 13
> ****************************************



More information about the PSTricks mailing list