My legend shows both plots as the same colour (blue) when in fact they
are different colours. Here's the relevant code:

    font = FontProperties(size='small');
        ...
    b1 = bar(i,lowermeans,width,color='b')
    b2 = bar(i+width,uppermeans,width,color='y')
        ...    
    legend((b1,b2),(l,u),prop=font)

I use legend exactly like this elsewhere and it works. So I can't figure
out why in this case the legend shows both bars as blue.

Any help? Thanks

Screenshot http://www.10pix.com/show.php/172028_figure1.png.html and
full code (lowermeans and uppermeans are the lists of values to be
plotted):
    
    i = arange(0,len(lowermeans))
    width=0.4
    b1 = bar(i,lowermeans,width,color='b')
    b2 = bar(i+width,uppermeans,width,color='y')
    
    mean,variance,deviation = stats(lowermeans)
    m = "Mean: "+str(round(mean,2))
    v = "Variance: "+str(round(variance,2))
    d = "Standard deviation: "+str(round(deviation,2))
    l = "Lower-bounds"+'\n'+m+'\n'+v+'\n'+d
    mean,variance,deviation = stats(uppermeans)
    m = "Mean: "+str(round(mean,2))
    v = "Variance: "+str(round(variance,2))
    d = "Standard deviation: "+str(round(deviation,2))
    u = "Upper-bounds"+'\n'+m+'\n'+v+'\n'+d
    legend((b1,b2),(l,u),prop=font)
    
    ticks = arange(1,len(lowermeans)+1)
    xticks(i+width,ticks,rotation='vertical')          
    xlim(0,len(i))
    
    ylabel('Lower- and upper-bounds in %')
    xlabel('Sessions')
    title('Means of lower- and upper-bound measures per session')



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to