Plot line/Line2D with edgecolor

Hello,

I would like to plot a simple line using plt.plot(x, y, ‘w--’, lw=2)
or with the corresponding axes instance ax.plot(x, y, ‘w--’, lw=2).
However, I want the line to have a thin black edge like the edge of a
marker. Is this possible? I tried to find a property of the Line2D
object but I could not find anything. Has someone an idea?

Thanks in advance

Daniel

Daniel,

Here's how civil-engineer-hack-fest that i'd use to do it:

import matplotlib.pyplot as plt
import numpy as np
x = np.arange(0,10,0.1)
y = -4 + 2*x - 1.5*x**2
fig, ax1 = plt.subplots()
ax1.plot(x, y, 'c-', lw=2.5, zorder=10)
ax1.plot(x, y, 'k-', lw=4.0, zorder=5)
plt.show()

Hope that helps.
-paul

···

On Wed, Jun 27, 2012 at 5:02 PM, Daniel Platz <mail.to.daniel.platz@...982...> wrote:

Hello,

I would like to plot a simple line using plt.plot(x, y, ‘w--’, lw=2)
or with the corresponding axes instance ax.plot(x, y, ‘w--’, lw=2).
However, I want the line to have a thin black edge like the edge of a
marker. Is this possible? I tried to find a property of the Line2D
object but I could not find anything. Has someone an idea?