diff options
author | Karl Berry <karl@freefriends.org> | 2011-02-05 00:16:56 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-02-05 00:16:56 +0000 |
commit | 3452f352c7df351df8f08f0ae01f6cae4ace2fb4 (patch) | |
tree | 2e6618d90444854d4fdc9f0f6273546566d884b5 /Master/texmf-dist/tex/generic/pstricks-add | |
parent | acc047ba3ea08abac25940c1cec10cced0297c4b (diff) |
pstricks-add (2feb11)
git-svn-id: svn://tug.org/texlive/trunk@21290 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 | 85 |
1 files changed, 77 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 3d7da83946c..0361b9c16d8 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 445 2011-01-18 18:43:16Z herbert $ +%% $Id: pstricks-add.tex 459 2011-02-02 18:32:36Z herbert $ %% %% %% This is file `pstricks-add.tex', @@ -31,8 +31,8 @@ \ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi \ifx\PSTmathLoaded\endinput\else \input pst-math \fi % -\def\fileversion{3.49} -\def\filedate{2011/01/18} +\def\fileversion{3.51} +\def\filedate{2011/02/02} \message{`pstricks-add' v\fileversion, \filedate\space (dr,hv)} % \edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax @@ -1633,17 +1633,22 @@ dup #1Delta.X m 1 add get mul #1.X m get add #1Tick.X j 3 -1 roll put % s on sta % ..... % ] def % +\def\pswavelengthToGRAY{ tx@addDict begin wavelengthToGRAY end } +\def\pswavelengthToRGB{ tx@addDict begin wavelengthToRGB Red Green Blue end } +% \define@key[psset]{pstricks-add}{Xoffset}[0pt]{\pst@getlength{#1}\psk@Xoffset} \define@key[psset]{pstricks-add}{Yoffset}[0pt]{\pst@getlength{#1}\psk@Yoffset} \define@key[psset]{pstricks-add}{XYoffset}[0pt]{\pst@getlength{#1}\psk@Xoffset\let\psk@Yoffset\psk@Xoffset} \psset[pstricks-add]{XYoffset=0pt} \define@key[psset]{pstricks-add}{colorType}[0]{\def\psk@colorType{#1}} -\psset[pstricks-add]{colorType=0} % 0-> two color mode 1->wavelength mode (400..700nm) +\define@key[psset]{pstricks-add}{colorTypeDef}[{}]{\def\psk@colorTypeDef{#1\space}} +\psset[pstricks-add]{colorType=0,colorTypeDef={}} % 0-> two color mode 1->wavelength mode (400..700nm) % 0-> two color mode % 1-> wavelength mode (400..700nm) % 2-> wavelength mode inverse % 3-> gray color mode % 4-> gray color mode invers +% 5-> own color definition \def\psMatrixPlot{\def\pst@par{}\pst@object{psMatrixPlot}} \def\psMatrixPlot@i#1#2#3{% \pst@killglue% @@ -1667,16 +1672,18 @@ dup #1Delta.X m 1 add get mul #1.X m get add #1Tick.X j 3 -1 roll put % s on sta dup 0 gt { % test if > 0 \or Min sub dMaxMin div 300 mul 400 add - tx@addDict begin wavelengthToRGB Red Green Blue end setrgbcolor + \pswavelengthToRGB setrgbcolor \or Min sub dMaxMin div neg 1 add 300 mul 400 add - tx@addDict begin wavelengthToRGB Red Green Blue end setrgbcolor + \pswavelengthToRGB setrgbcolor \or Min sub dMaxMin div neg 1 add 300 mul 400 add - tx@addDict begin wavelengthToGRAY end setgray + \pswavelengthToGRAY setgray \or Min sub dMaxMin div neg 1 add 300 mul 400 add - tx@addDict begin wavelengthToGRAY end neg 1 add setgray + \pswavelengthToGRAY neg 1 add setgray + \or + currentdict /colorTypeDef known { colorTypeDef } { \psk@colorTypeDef } ifelse \fi x \psk@xStep\space mul \pst@number\psxunit mul \ifPst@ChangeOrder #1 y sub 1 add \else y \fi \psk@yStep\space mul \pst@number\psyunit mul Dot% @@ -2252,6 +2259,68 @@ dup #1Delta.X m 1 add get mul #1.X m get add #1Tick.X j 3 -1 roll put % s on sta Xt #1 add Yt #2 add ) {EllipseT2}% \ignorespaces}% % +\define@key[psset]{pstricks-add}{rotate}{\def\psk@rotate{#1 }} +\psset[pstricks-add]{rotate=0} + +\def\pst@saveDegrees{} + +\def\psKiviat{\pst@object{psKiviat}} +\def\psKiviat@i#1#2{% #1: number of edges #2 radius + \gdef\pst@saveDegrees{#1} + \begingroup% + \degrees[#1]% + \SpecialCoor% + \addbefore@par{rotate=0} + \use@par% + \global\let\psk@@rotate\psk@rotate + \def\pst@Coordinates{} + \psLoop{#1}{\xdef\pst@Coordinates{\pst@Coordinates(#2;\the\psLoopIndex)}} + \rput{\psk@rotate}(0,0){\expandafter\pspolygon\pst@Coordinates + \multido{\nA=0+1}{#1}{\uput{\pslabelsep}[\nA]{*0}(#2;\nA){\psPutYLabel{\nA}}}} + \endgroup% + \ignorespaces} +% +\def\psKiviatLine{\pst@object{psKiviatLine}} +\def\psKiviatLine@i#1{{% + \addbefore@par{showpoints}% + \use@par% + \degrees[\pst@saveDegrees]% + \psKiviatLine@ii#1\@nil}}% +\def\psKiviatLine@ii#1,#2\@nil{% + \global\pst@cntm=0 + \global\pst@cntn=1 + \begingroup + \xdef\pst@saveCoors{} + \psKiviatLine@iii#1,#2,#1,,\@nil + \rput{\psk@@rotate}(0,0){\expandafter\pspolygon\pst@saveCoors} +} +\def\psKiviatLine@iii#1,#2,#3\@nil{% + \ifx\relax#2\relax\else%\psline(#1;\the\pst@cntm)(#2;\the\pst@cntn) + \xdef\pst@saveCoors{\pst@saveCoors(#1;\the\pst@cntm)}\fi + \advance\pst@cntm\@ne + \advance\pst@cntn\@ne + \ifx\relax#3\relax\endgroup\else\psKiviatLine@iii#2,#3\@nil\fi} +% +\def\psKiviatTicklines{\pst@object{psKiviatTicklines}} +\def\psKiviatTicklines@i#1#2{{% n, radius + \degrees[#1]% + \use@par% + \pstFPDiv\pst@tempN{#2}{\psk@Dx}% + \pst@cntm=\pst@tempN \advance\pst@cntm by \m@ne + \multido{\rA=\psk@Dx+\psk@Dx}{\the\pst@cntm}{% + \def\pst@Coordinates{}% + \psLoop{#1}{\xdef\pst@Coordinates{\pst@Coordinates(\rA;\the\psLoopIndex)}}% + \rput{\psk@@rotate}(0,0){\expandafter\pspolygon\pst@Coordinates}% + }% +}\ignorespaces}% +% +\def\psKiviatAxes{\pst@object{psKiviatAxes}} +\def\psKiviatAxes@i#1#2{{% + \degrees[#1] + \use@par% + \multido{\iA=0+1}{#1}{\rput{\psk@@rotate}(0,0){\psline(0,0)(#2;\iA)}}% + }\ignorespaces}% +% \def\resetOptions{% \def\pst@linetype{0}% \pstScalePoints(1,1){}{}% |