Thanks for the suggestion JJ.
I have actually changed my initial approach. Now I am just using
colored text to create pseudo-legends, like shown below:
ax1.text(0.40, 0.8, "Cloud-base", fontsize=14, transform=ax1.transAxes)
ax1.text(0.40, 0.7, "BallVario", fontsize=14, color='b',
transform=ax1.transAxes)
ax1.text(0.40, 0.6, "AIMMS", fontsize=14, color='g', transform=ax1.transAxes)
By the way, from the linked construct, changing width and height of
the rectangle doesn't have any affect.
p = Rectangle((0, 0), 1, 1, fc="r")
legend([p], ["Red Rectangle"])
p = Rectangle((0, 0), 10.0, 2.0, fc="r")
plt.legend([p], ["Red Rectangle"])
or making trying a smaller rectangle:
p = Rectangle((0, 0), 0.2, 1, fc="r")
plt.figure(); plt.legend([p], ["Red Rectangle"])
···
On Fri, Oct 22, 2010 at 6:26 AM, Jae-Joon Lee <lee.j.joon@...287...> wrote:
On Thu, Oct 21, 2010 at 4:31 AM, Gökhan Sever <gokhansever@...287...> wrote:
How could I change the appearance of the legend symbol in this case?
It auto-uses a patch object (rectangle in this case).
I would like to get a straight line instead.
You may use proxy artists.
http://matplotlib.sourceforge.net/users/legend_guide.html#using-proxy-artist
Regards,
-JJ
--
Gökhan