|
From: Curiouslearn <cur...@gm...> - 2011-02-08 20:32:54
|
Sorry if the subject line does not use correct terminology. But the
following explains the question I have:
Suppose I have the following code:
import matplotlib.pyplot as plt
fig1 = plt.figure()
ax1 = fig1.add_subplot(1,1,1)
ax1.scatter(xvalues, yvalues)
ax1.axvline(1.3, color='DarkGreen')
rect = ax1.patch
rect.set_facecolor('SteelBlue') #This works
rect.set_edgecolor('red') # Is it supposed to set the color of the
border. If so, this DOES NOT work.
rect.set_linestyle('dashed') # This DOES NOT work.
rect.set_linewidth(4) # This DOES NOT work.
For the things that do not work, I tried both
plt.show()
and,
plt.savefig('this_figure.pdf')
Why do the things that I have indicated do not work?
My second question is, if I want to have only the x-axis and y-axis
line (i.e., get rid of the right edge and top edge of the axes frame)
how do I do it?
I am using the Matplotlib version that comes with Enthought Python
Distribution 6.3.
Thanks for your help.
|