# Modify filter appearance in pst-optexp

I would like to change the appearance of the filters available in pst-optexp:

There're three waves in each filter box. I want the ones with a slash to be red and the others to remain black. How can I do that?

Code:

\documentclass[margin=0]{standalone}
\usepackage{pst-optexp}
\begin{document}
\begin{pspicture}(7,3)
\psset[optexp]{fiber=none,usefiberstyle}
\newpsstyle{Fiber}{linecolor=red,linewidth=2\pslinewidth}
\newpsstyle{Beam}{linestyle=none,fillstyle=solid,fillcolor=red,opacity=1}
\pnodes(2,2){Laser}(3,2){BS}(4,2){LP}(5,2){HP}(6,2){BP}
\optbox[optboxsize=2 1,innerlabel,position=start](Laser)(Laser){LASER}
\optfilter[filtertype=bandstop,filtersize=0.5,labeloffset=0.5,labelangle=-180](BS)(BS){BS}
\optfilter[filtertype=lowpass,filtersize=0.5,labeloffset=0.5,labelangle=-180](LP)(LP){LP}
\optfilter[filtertype=highpass,filtersize=0.5,labeloffset=0.5,labelangle=-180](HP)(HP){HP}
\optfilter[filtertype=bandpass,filtersize=0.5,labeloffset=0.5,labelangle=-180](BP)(BP){BP}
\drawwidebeam[beamwidth=0.1] {1-5}
\end{pspicture}
\end{document}


Edit: I tried adding linecolor=red to the filters but the whole box becomes red. I need only the slashed waves to be red. Expected result:

• Excuse ma, but ‘the others’ (without a slash) can't remain black, since they're red. What do you want exactly? – Bernard Sep 10 at 18:21
• Basically to invert the colors. The slashed ones become red and the non slashed, black. – Rodrigo Sep 10 at 18:24

I have added one line and modified a second one. Both are marked in the source below.

\documentclass[margin=0]{standalone}
\usepackage{pst-optexp}
\begin{document}
\begin{pspicture}(7,3)
\psset[optexp]{fiber=none,usefiberstyle}
\newpsstyle{FilterStyle}{linecolor=red}% <<< Define FilterStyle
\newpsstyle{Fiber}{linecolor=black,linewidth=1\pslinewidth}% <<< Set linecolor to black
\newpsstyle{Beam}{linestyle=none,fillstyle=solid,fillcolor=red,opacity=1}
\pnodes(2,2){Laser}(3,2){BS}(4,2){LP}(5,2){HP}(6,2){BP}
\optbox[optboxsize=2 1,innerlabel,position=start](Laser)(Laser){LASER}
\optfilter[filtertype=bandstop,filtersize=0.5,labeloffset=0.5,labelangle=-180](BS)(BS){BS}
\optfilter[filtertype=lowpass,filtersize=0.5,labeloffset=0.5,labelangle=-180](LP)(LP){LP}
\optfilter[filtertype=highpass,filtersize=0.5,labeloffset=0.5,labelangle=-180](HP)(HP){HP}
\optfilter[filtertype=bandpass,filtersize=0.5,labeloffset=0.5,labelangle=-180](BP)(BP){BP}
\drawwidebeam[beamwidth=0.1] {1-5}
\end{pspicture}
\end{document}