4

I would like the psequipotential lines to be dotted or dashed (preferably dashed) and the pselectricfield lines to be solid. I tried doing this but it does not become dashed:

\documentclass[english]{article}
\usepackage[T1]{fontenc}

\makeatletter
\usepackage{pstricks}
\usepackage{pst-electricfield}

\makeatother

\usepackage{babel}
\begin{document}
\begin{center}
\begin{pspicture*}(-2.5,-2.5)(2.5,2.5)
\psscalebox{0.8}{
\psElectricfield[Q={[-1 -1 0][1 1 0]},linecolor=black]
\psEquipotential[Q={[-1 -1 0][1 1 0]},linecolor=black,linestyle=dashed](-6.1,-6.1)(6.1,6.1)}
\end{pspicture*}
\par\end{center}
\end{document}

Here is the picture that is rendered:

enter image description here

I would like the circular lines that form loops and made from very small dots to be dashed. The electric field lines which are arrows are find it is the equipotential lines I would like to be dashed. How do I do this?

2
  • 1
    Weird. Not even the usual trick of putting \psset{linestyle=dashed} before the command seems to work. (If you have gnuplot installed, you can also do implict plots with pgfplots, I think.)
    – user121799
    Aug 21, 2018 at 15:05
  • 1
    If you look closely you can see that the equipotential lines are made of a lot of small dots rather than lines, so I think that may be the reason, but I am not entirely sure
    – sab hoque
    Aug 22, 2018 at 11:47

1 Answer 1

2

With the .pro and .tex version from

http://archiv.dante.de/~herbert/texnik/dvips/pst-electricfield/

http://archiv.dante.de/~herbert/texnik/tex/generic/pst-electricfield/

the following works. For the equipotentiallines is no dash possible:

\documentclass{article}
\usepackage{pst-electricfield}

\begin{document}
\begin{center}
\begin{pspicture*}(-2.5,-2.5)(2.5,2.5)
\psscalebox{0.8}{%
    \psElectricfield[Q={[-1 -1 0][1 1 0]},linecolor=red,linestyle=dashed]
    \psEquipotential[Q={[-1 -1 0][1 1 0]},linecolor=blue](-4,-4)(4,4)}
\end{pspicture*}
\end{center}
\end{document}

enter image description here

2
  • I would like the other set of lines, the blue ones to be dashed instead
    – sab hoque
    Aug 22, 2018 at 7:36
  • 1
    Not possible, implicit defined functions are plotted dots and no lines or curves
    – user2478
    Aug 25, 2018 at 7:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .