I am trying to plot unfilled symbols but the matplotlib facecolors='none' argument just seems to change the fill colour. Note, i am using matplotlib style 'ggplot'.
Original code snippet with filled symbols:
ax=df.plot(kind='scatter', x='clay', y='vf1',xlim=[0,0.6],ylim=[0,6.0e-06],
color='DarkBlue', s=40, label='u*=1, w=0')
Now attempting to use facecolors='none' (and setting edgecolors to the colour i want them)
ax=df.plot(kind='scatter', x='clay', y='vf1',xlim=[0,0.6],ylim=[0,6.0e-06],
facecolors='none', edgecolors='DarkBlue', s=40, label='u*=1, w=0')
It turns out that no matter what colour i enter for 'facecolors', the shading is always light blue. Does anybody know what's going on here, and how i can actually get an unshaded symbol?
***UPDATE**** After BrenBarn's answer below, i have the following, which is exactly what i wanted.
ax=df.plot(kind='scatter', x='clay', y='vf1',xlim=[0,0.6],ylim=[0,6.0e-06],
c='none', edgecolor='DarkBlue', s=40, label='u*=1, w=0')
Pandas uses the plot() method to create diagrams. We can use Pyplot, a submodule of the Matplotlib library to visualize the diagram on the screen. Read more about Matplotlib in our Matplotlib Tutorial.
To plot a specific column, use the selection method of the subset data tutorial in combination with the plot() method. Hence, the plot() method works on both Series and DataFrame .
It looks like you are not plotting directly with matplotlib, but with pandas (which is using matplotlib under the hood). But pandas' plot methods take a c
argument for the point color. Try passing c='none'
instead of facecolor='none'
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With