Given this elegant solution that allows one to vary the color along plots, I'm wondering if there is a simple way to change the color along PSTricks lines, arcs, circles, ellipses and so on.


Only possible for plots which can be defined as a parametric equation or a simple line. You need package pst-hsb from

http://archiv.dante.de/~herbert/texnik/tex/generic/pst-hsb/pst-hsb.tex http://archiv.dante.de/~herbert/texnik/tex/latex/pst-hsb/pst-hsb.sty

See also: http://pstricks.blogspot.de/2011/09/vos-courbes-aux-couleurs-de-larc-en.html


\psparametricplotHSB[HSB=false,linecolor=red]{0}{360}{t 36 div t sin 4 mul}
\psparametricplotHSB[algebraic]{0}{6.3}{t/0.628 | cos(t)*4}
\psparametricplotHSB[algebraic]{0}{6.3}{4*sin(t)+5 | 4*cos(t)}


enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy