# Varying the color along pstricks lines, circles etc

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

\documentclass[pstricks,border=10pt]{standalone}
\usepackage{pst-hsb}
\begin{document}

\begin{pspicture}(-0.5,-5)(11,5)
\psaxes{->}(0,0)(0,-4)(11,5)
\psset{plotpoints=300,linewidth=1mm}
\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)}
\pslineHSB(0,-4)(10,4)
\pslineHSB[HueBegin=0.2,HueEnd=0.9](0,4)(10,-4)
\end{pspicture}

\end{document}