Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion How to get more than 5 colors in a plot?

Received: by 10.236.35.40 with SMTP id t28mr744756yha.27.1350652810058;
        Fri, 19 Oct 2012 06:20:10 -0700 (PDT)
X-BeenThere: pydata@googlegroups.com
Received: by 10.236.133.84 with SMTP id p60ls2245177yhi.5.gmail; Fri, 19 Oct
 2012 06:20:09 -0700 (PDT)
Received: by 10.236.102.231 with SMTP id d67mr716091yhg.6.1350652809378;
        Fri, 19 Oct 2012 06:20:09 -0700 (PDT)
Received: by 10.236.102.231 with SMTP id d67mr716090yhg.6.1350652809367;
        Fri, 19 Oct 2012 06:20:09 -0700 (PDT)
Return-Path: <alva...@gmail.com>
Received: from mail-ye0-f175.google.com (mail-ye0-f175.google.com [209.85.213.175])
        by gmr-mx.google.com with ESMTPS id g7si68106anp.1.2012.10.19.06.20.08
        (version=TLSv1/SSLv3 cipher=OTHER);
        Fri, 19 Oct 2012 06:20:08 -0700 (PDT)
Received-SPF: pass (google.com: domain of alva...@gmail.com designates 209.85.213.175 as permitted sender) client-ip=209.85.213.175;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of alva...@gmail.com designates 209.85.213.175 as permitted sender) smtp.mail=alva...@gmail.com; dkim=pass header...@gmail.com
Received: by mail-ye0-f175.google.com with SMTP id m2so25811yen.20
        for <pydata@googlegroups.com>; Fri, 19 Oct 2012 06:20:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:sender:in-reply-to:references:from:date
         :x-google-sender-auth:message-id:subject:to:content-type
         :content-transfer-encoding;
        bh=AN93iJXHWBAYttbgpMoHJuGlWjtCIK2w6GNH7HsM5Yw=;
        b=mDEJoPAeV3Zy8OV8lnkXOw5rEFwVzp3OB6XEYeRgQKAuJK+It3rJ2xUFIRdziQGt8l
         hgpatuey9A+mE0Zp8NqNFr/qZhu35C7oWJDlHjFBWPANfpiME4Jdju4eS2xlFWu0RGo6
         qnJkJ1uo/LZYSicfHu7tX80zV12zmyhqCNr5bZhAWP6AMyrbgM1iPlZXZAl2BPXp2BW5
         ZBaq9sWpimvYqoFpwiwPRJmEQM9TIRzEtgtCYz7sutxGHHHp52ESVmVyWptNbdWP8Xlo
         xU7do0bbv8IlqQHoesp3bYEo/0eWimHo3qnABO6sTPL1Zb5qsES+KgH4WVAXw8M0Y4xb
         F2Jg==
Received: by 10.236.134.195 with SMTP id s43mr1039288yhi.64.1350652808269;
 Fri, 19 Oct 2012 06:20:08 -0700 (PDT)
MIME-Version: 1.0
Sender: alva...@gmail.com
Received: by 10.101.204.18 with HTTP; Fri, 19 Oct 2012 06:19:48 -0700 (PDT)
In-Reply-To: <CAKS7gT7WZp2MUyrHCij4NgTReZvBRbsGY+SQp0F3iux67NM...@mail.gmail.com>
References: <20cf300fb11be1f71204cbb55...@google.com> <CC9B12AE.25D1B%stan...@haas.berkeley.edu>
 <CAFFY=MH77+hV+UsRqY296ozK=ynObW_j6oAk80zLpMSfJq9...@mail.gmail.com> <CAKS7gT7WZp2MUyrHCij4NgTReZvBRbsGY+SQp0F3iux67NM...@mail.gmail.com>
From: Alvaro Tejero Cantero <alv...@minin.es>
Date: Fri, 19 Oct 2012 14:19:48 +0100
Message-ID: <CAFFY=MGLAf=Ve=1+hR2K6b29uK+sjj_rsCbRXaOqwd_tjJW...@mail.gmail.com>
Subject: Re: [pydata] Re: How to get more than 5 colors in a plot?
To: pydata@googlegroups.com
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

from matplotlib.colors import cnames
blocks.apply(equip_units, axis=3D1).fillna(0).plot(kind=3D'barh',
stacked=3DTrue, style=3Dcnames.keys()).set_xlabel('number'); plt.show()


-=C3=A1.


On 19 October 2012 14:18, Wouter Overmeire <loda...@gmail.com> wrote:
>
>
> 2012/10/19 Alvaro Tejero Cantero <alv...@minin.es>
>>
>> Hi,
>>
>> FWIW I just tried style=3Dcnames.keys() with df.plot(kind=3D'barh',
>> stacked=3DTrue); cycling colors does not work there
>>
>> -=C3=A1.
>>
>>
>> On 10 October 2012 19:56, Richard Stanton <stan...@haas.berkeley.edu>
>> wrote:
>> >>
>> >>Wouter Overmeire <loda...@gmail.com>
>> >> Oct 09 08:41PM +0200
>> >>This will give you 145 different colors.
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>In [45]: from matplotlib.colors import cnames
>> >>In [46]: df.plot(style=3Dcnames.keys())
>> >
>> > Thanks, Wouter.
>> >>
>> >>
>> >
>> > --
>> >
>> >
>>
>> --
>>
>>
>
> Can you show the exact command you used?
>
> --
>
>