On Wed, Jun 27, 2012 at 5:02 PM, Daniel Platz
<mail.to.daniel.pl...@googlemail.com> 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?

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

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to