As far as I understand it, the "dashed" style option is a shorthand that sets /tikz/dash pattern
to a dashed style (PGF manual v2.1, p157). That then stays in effect for the rest of the path, until you change the dash pattern again. Because the other styles don't specify the dash pattern, they'll keep using whatever was in effect. Try adding "solid" to the definitions of (anti-)particle and gluon, and it should work.
Run with xelatex
(takes some time) or latex
->dvips
->ps2pdf
:
\documentclass{article}
\usepackage{pst-electricfield}
\begin{document}
\begin{pspicture*}(-6,-6)(6,6)
\psframe*[linecolor=lightgray!50](-6,-6)(6,6)
\psgrid[subgriddiv=0,gridcolor=gray,griddots=10]
\psElectricfield[Q={[-1 -2 2][1 2 2][-1 2 -2][1 -2 -2]},linecolor=red]
\psEquipotential[Q={[-1 -2 2][1 2 2][-1 2 -2][1 -2 -2]},
linecolor=blue](-6.1,-6.1)(6.1,6.1)
\psEquipotential[Q={[-1 -2 2][1 2 2][-1 2 -2][1 -2 -2]},
linecolor=green,linewidth=2\pslinewidth,Vmax=0,Vmin=0](-6.1,-6.1)(6.1,6.1)
\end{pspicture*}
\end{document}
and for a stream density plot:
\documentclass[pstricks,border=5pt]{standalone}
\usepackage{pst-magneticfield}
\begin{document}
\begin{pspicture}(-6,-4)(6,4)
\psmagneticfield[N=3,R=2,L=2,StreamDensityPlot](-6,-4)(6,4)
\end{pspicture}
\end{document}
Best Answer
Remarks
Here is minimal working example using the
\pssin
command from thepst-coil
package and theArrowInside
option from thepstricks-add
package.There is a huge downside with this implementation: You can not preserve the frequency of the sine when shortening the line. The command will always draw as many periods as given in the argument not matter how long the line actually is. Compare:
\pssin[periods=5](0,0)(2,0)
and\pssin[periods=5](0,0)(8,0)
.Samples
Compile with
xelatex
.1.)
Inspired by g.kov's answer, I added some labels.
Implementation
Output
2.)
Implementation
Output
3.)
Implementation
As you can see in the screenshot, the
\pscoil
thing is a little bit tricky.Output