How might create a legend for an area chart made with PolyCollection objects
via the fill_between method? For example, on the following chart,
import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure()
ax = fig.add_subplot(111)
ind = np.arange(3)
y1 = np.array([1,2,3])
y2 = y1 * 2
a =
I apologize for my previous posts. I see that the PolyCollection object is
not supported by the legend command. I will use a proxy artist as described
here http://matplotlib.sourceforge.net/users/legend_guide.html.
- Chuck
I am trying to plot a line area graph similar to a stacked bar chart.
E.g
import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure()
ax = fig.add_subplot(111)
ind = np.arange(3)
y1 = np.array([1,2,3])
y2 = y1 * 2
a = ax.fill_between(ind, y1, np.zeros(len(ind)), facecolor='r')
b =
Does anybody have a good method for preserving quality and transparancy of
eps images when going from matplotlib to latex to pdf? I can only preserve
the transparency if I save as png and then convert to eps but then I lose
quality. If I save as eps directly, all my patches are opaque despite
but a postscript limitation. The best solution
is to save your matplotlib figures as pdf, which is also a vector
format but which does support transparency, and then use pdflatex
JDH
--
Chuck Pepe-Ranney
Spear Lab
Colorado School of Mines
Work: (303)384-2477
Cell: (575)313-0993
I am using the svn matplotlib (1.0.svn) and when I try to plot a histogram I
get an AttributeError for draw_gouraud_triangle (traceback below). I have
not had this problem in the past. Is anyone else experiencing this?
Thanks,
- Chuck
In [3]: x = mu + sigma*randn(10)
In [4]: hist(x, 50,
guess for some reason it is still loading an old version of that
extension. If forcing the full rebuild doesn't help, can you send the
output of your build?
Cheers,
Mike
On 08/19/2009 10:59 AM, Chuck Pepe-Ranney wrote:
I am using the svn matplotlib (1.0.svn) and when I try to plot
I know that there is a keyword argument for adjusting the width of legend
handles but how would I reduce the *height* of rectangle label handles?
-Chuck
--
___
Matplotlib-users
Hello Users,
I need some help with formatting a legend for a stacked bar graph. Each bar
is segmented into ~35 categories so my legend ends up being a long mess
overlapping my plot. How can I position my legend outside of the plot and
reduce the spacing and fontsize for the text?
Thanks,
-