Re: [Matplotlib-users] Making space for a long legend outside of a barchart

2013-05-23 Thread Martin Mokrejs
Hi Chao, I spent some time to figure out why I cannot replace ax1.hist() with ax1.scatter(). It seems hist() returns list of 'Rectangle' (sadly if there is just one, it does return just the 'Rectangle' (not wrapped in a list) ... somewhere a trick a = [a, ] is likely needed. Anyway, my

Re: [Matplotlib-users] Making space for a long legend outside of a barchart

2013-05-23 Thread ChaoYue
Hi Martin, I am not sure that I understand your question very well. For a single scatter() plot, I guess I agree with you, you need to put it in [] because legend() function must receive iterable as far as I understand. I don't think scatter() allows you to pass a series of group of (x,y) data

Re: [Matplotlib-users] Making space for a long legend outside of a barchart

2013-05-22 Thread Martin Mokrejs
Hi Chao, ChaoYue wrote: Dear Martin, I worked out a similar example for your reference as I don't catch your example very well. I think you got the idea quite well. fig = plt.figure() ax1 = fig.add_subplot(211)

Re: [Matplotlib-users] Making space for a long legend outside of a barchart

2013-05-22 Thread ChaoYue
Hi Martin, I don't know tight_layout quite well. Probably you could also split the handlers of the barplot into and 2 or 3 or 4 parts depending on the number, and then show them in sperate axes? then you create n+1 subplots for the whole figure? probably this is quite stupid. cheers, Chao On

Re: [Matplotlib-users] Making space for a long legend outside of a barchart

2013-05-22 Thread Martin Mokrejs
ChaoYue wrote: Hi Martin, I don't know tight_layout quite well. Probably you could also split the handlers of the barplot into and 2 or 3 or 4 parts depending on the number, and then show them in sperate axes? then you create n+1 subplots for the whole figure? No, the reason why I use

Re: [Matplotlib-users] Making space for a long legend outside of a barchart

2013-05-21 Thread ChaoYue
Dear Martin, I worked out a similar example for your reference as I don't catch your example very well. fig = plt.figure() ax1 = fig.add_subplot(211) ax2 = fig.add_subplot(212) arrlist = [np.random.normal(size=100) for i in range(50)] ret = ax1.hist(arrlist,histtype='barstacked') reclist =

Re: [Matplotlib-users] Making space for a long legend outside of a barchart

2013-05-20 Thread Benjamin Root
On Mon, May 20, 2013 at 12:02 PM, Martin Mokrejs mmokr...@fold.natur.cuni.cz wrote: Hi, I am having trouble to get space allocated for a long legend text, lets say spanning 2/3 - 3/4 of the whole output. I would like to have stacked barchart as 1st subplot and the place of remaining 3