[Matplotlib-users] legend for area chart made with fill_between method

2009-12-07 Thread Chuck Pepe-Ranney
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 =

[Matplotlib-users] PolyCollection not supported by legend

2009-12-07 Thread Chuck Pepe-Ranney
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

[Matplotlib-users] legend with

2009-12-04 Thread Chuck Pepe-Ranney
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 =

[Matplotlib-users] preserving transparency in eps

2009-08-31 Thread Chuck Pepe-Ranney
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

Re: [Matplotlib-users] preserving transparency in eps

2009-08-31 Thread Chuck Pepe-Ranney
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

[Matplotlib-users] AttributeError: draw_gouraud_triangle

2009-08-19 Thread Chuck Pepe-Ranney
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,

Re: [Matplotlib-users] AttributeError: draw_gouraud_triangle

2009-08-19 Thread Chuck Pepe-Ranney
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

[Matplotlib-users] adjusting the height of rectangle legend handles

2009-07-21 Thread Chuck Pepe-Ranney
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

[Matplotlib-users] formatting help with legend for stacked bar graph with many categories

2009-07-16 Thread Chuck Pepe-Ranney
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, -