diff options
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2008-05-17 14:28:18 +0000 |
---|---|---|
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2008-05-17 14:28:18 +0000 |
commit | 5bb3d3a90123ee043d1502d4bc9d8d50b063904c (patch) | |
tree | da549deeb84d609f06fdb70d197ebab09c440bea /Master/texmf-dist/tex/generic/pstricks-add | |
parent | ec1024d29e6ef9979eff704128f6dba53e72987e (diff) |
pstricks-add v 3.02 2008-04-25
git-svn-id: svn://tug.org/texlive/trunk@8190 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pstricks-add')
-rw-r--r-- | Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex | 115 |
1 files changed, 107 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex b/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex index ab07c6579c2..80095342963 100644 --- a/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex +++ b/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex @@ -1,4 +1,4 @@ -%% $Id: pstricks-add.tex 20 2008-04-15 18:40:18Z herbert $ +%% $Id: pstricks-add.tex 23 2008-05-15 21:51:18Z herbert $ %% %% %% This is file `pstricks-add.tex', @@ -29,8 +29,8 @@ \ifx\MultidoLoaded\endinput\else \input multido \fi \ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi % -\def\fileversion{3.01} -\def\filedate{2008/01/26} +\def\fileversion{3.02} +\def\filedate{2008/05/16} \message{`pstricks-add' v\fileversion, \filedate\space (dr,hv)} % \edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax @@ -38,6 +38,7 @@ \pst@addfams{pstricks-add} % %% prologue for postcript +\pstheader{ps.pro}% \pstheader{pstricks-add.pro}% %\pstheader{pst-algparser.pro}% done by pstricks.tex % @@ -1359,8 +1360,8 @@ \define@key[psset]{pstricks-add}{labelFontSize}{\def\psk@labelFontSize{#1}}% \define@boolkey[psset]{pstricks-add}[Pst@]{mathLabel}[true]{% \ifPst@mathLabel - \def\pshlabel##1{\psk@labelFontSize$##1$}% - \def\psvlabel##1{\psk@labelFontSize$##1$} + \def\pshlabel##1{$\psk@labelFontSize##1$}% + \def\psvlabel##1{$\psk@labelFontSize##1$} \else \def\pshlabel##1{\psk@labelFontSize##1}% \def\psvlabel##1{\psk@labelFontSize##1} @@ -1486,8 +1487,11 @@ %% #2 decimals %% #3 dot \def\@stripDecimals#1.#2.#3\@nil{% - \def\dummy{#1}% - \ifx\dummy\@empty\the\@zero\else#1\fi% the integer part +\typeout{1: #1} +\typeout{2: #2} +\typeout{3: #3} + \def\pst@dummy{#1}% + \ifx\pst@dummy\@empty\the\@zero\else#1\fi% the integer part } % \def\pst@@@vlabel#1{% @@ -2392,7 +2396,7 @@ \pst@number\psyunit mul exch \pst@number\psxunit mul exch } def}% - \else + \else% polarplot % D.G. modification end \addto@pscode{% \psplot@init @@ -2607,6 +2611,7 @@ \end@SpecialObj% } % +% % LSM Least Square Method 2006-03-13 (hv) \def\psLSM@ii{\addto@pscode{false \tx@NArray \psLSM@iii}} \def\psLSM@iii{% @@ -3116,6 +3121,100 @@ \ignorespaces% } % +\newdimen\pie@ColorIndex +\newdimen\pie@ColorStep +\newcount\pie@Toggle +\newif\if@pieSep +\newif\if@pieUserColor +% +\define@key[psset]{pstricks-add}{pieColor}{\pst@expandafter\psk@@pieColor{#1}\@nil} +\def\psk@@pieColor#1#2\@nil{% + \ifx#1r\def\psk@pieColor{2}\else + \ifx#1c\def\psk@pieColor{380}\else\def\psk@pieColor{0}\fi\fi} +\psset[pstricks-add]{pieColor=gray}% gray, color, randomColor +% +\define@key[psset]{pstricks-add}{pieSep}{\pst@getlength{#1}\psk@pieSep} +\psset[pstricks-add]{pieSep=10pt} +% +\define@key[psset]{pstricks-add}{userColor}{% + \pie@Toggle=0 + \def\pie@option{#1} + \ifx\pie@option\@empty\@pieUserColorfalse + \else + \@pieUserColortrue + \expandafter\psk@@pieUserColor#1,,\@nil + \fi} +\def\psk@@pieUserColor#1,#2,#3\@nil{% + \advance\pie@Toggle by \@ne% + \xglobal\colorlet{pieFillColor\the\pie@Toggle}{#1}% + \typeout{pie:colorlet:pieFillColor\the\pie@Toggle=#1} + \def\pie@option{#2} + \ifx\pie@option\@empty\else\psk@@pieUserColor#2,#3,\@nil\fi}% +\psset[pstricks-add]{userColor={}} + +\def\psPie{\pst@object{psPie}} +\def\psPie@i#1#2#3{% #1:values #2:separated pies #3:radius + \pst@killglue + \begingroup + \pst@dimm=0pt\pst@cnta=1% + \psforeach{\pie@tempA}{#1}{% + \global\advance\pst@cnta by \@ne % no of entries + \global\advance\pst@dimm by \pie@tempA pt} + \addbefore@par{dimen=outer}% + \begin@SpecialObj% + \pst@getlength{#3}\pie@Radius + \ifnum\psk@pieColor>0 + \pie@ColorStep=400\p@\else\pie@ColorStep=\p@\fi % the "numerical color" + \divide\pie@ColorStep by \pst@cnta% % step =1/no or 400/no +% \typeout{psPie:colorStep: \pst@number\pie@ColorStep}% + \pie@ColorIndex=\psk@pieColor pt% % the start color (gray or wave) + \degrees[\pst@number\pst@dimm]% % instead of 360 degrees + \def\pie@alpha{0}% + \pst@dimm=0pt\pst@dimn=0pt\pst@dimo=0pt\pst@cnta=0% + \global\pie@Toggle=1 + \psforeach{\pie@tempA}{#1}{% + \global\advance\pst@dimm by \pie@tempA pt% + \global\advance\pst@dimn by \pie@alpha pt% + \def\pst@tempB{\pst@number\pie@ColorIndex}% +% \typeout{psPie:wave:color: \pst@tempB}% + \global\advance\pst@cnta by \@ne% + \if@pieUserColor\else + \def\pie@FillColor{pieFillColor\the\pst@cnta} + \ifnum\psk@pieColor>0 \xglobal\definecolor{\pie@FillColor}{wave}{\pst@tempB}% + \else\xglobal\definecolor{\pie@FillColor}{gray}{\pst@tempB}\fi% + \fi + \pst@dimo=0.5\pst@dimn\advance\pst@dimo by 0.5\pst@dimm% half angle of the pie + \global\@pieSepfalse% + \psforeach{\pie@tempC}{#2}{\ifnum\pie@tempC=\the\pst@cnta + \global\@pieSeptrue\fi}% + \if@pieSep + \pswedge[linecolor={pieFillColor\the\pst@cnta},fillstyle=solid,fillcolor={pieFillColor\the\pst@cnta}]% + (\psk@pieSep pt;\pst@number\pst@dimo){#3}{\pst@number\pst@dimn}{\pst@number\pst@dimm}% + \pst@dima=\pie@Radius pt \advance\pst@dima by \psk@pieSep pt + \pnode(\pst@dima;\pst@number\pst@dimo){psPie\the\pst@cnta}% + \pnode(.75\pst@dima;\pst@number\pst@dimo){psPieI\the\pst@cnta}% + \pnode(1.5\pst@dima;\pst@number\pst@dimo){psPieO\the\pst@cnta}% + \else + \pswedge[linecolor={pieFillColor\the\pst@cnta},fillstyle=solid,fillcolor={pieFillColor\the\pst@cnta}]% + {#3}{\pst@number\pst@dimn}{\pst@number\pst@dimm} + \pnode(#3;\pst@number\pst@dimo){psPie\the\pst@cnta}% + \pst@dima=\pie@Radius pt + \pnode(.75\pst@dima;\pst@number\pst@dimo){psPieI\the\pst@cnta}% + \pnode(1.5\pst@dima;\pst@number\pst@dimo){psPieO\the\pst@cnta}% + \fi% + \global\let\pie@alpha\pie@tempA% + \global\advance\pie@Toggle by \@ne + \ifnum\pie@Toggle<3 + \global\advance\pie@ColorIndex by 2\pie@ColorStep + \else + \global\pie@Toggle=0 + \global\advance\pie@ColorIndex by -\pie@ColorStep% + \fi% + }% end foreach + \end@SpecialObj% + \endgroup% + \ignorespaces% +} \def\resetOptions{% \@zero=0% \def\pst@linetype{0}% |