[PyX-user] Bar charts with different colours

I would like to make a bar chart where individual bars have different
colours. This is related to thematically related bars being plotted
together (21 one sub-categories being grouped into 6 groups, and thus 6
different colors). If I always had every category and sub-category in
each chart I could simply plot each group using an insert command, but
most graphs will not include every sub-category, so I may have instances
of a 4 bars on the graph and each should have a different colour. I
tried using data files with only one record, but this generated an
error. Perhaps I'm going about this the wrong way and there is a simpler
solution.
Any suggestions would be appreciated.
T
--
Trevor Wiens
Federation of Alberta Naturalists

Thread view

I would like to make a bar chart where individual bars have different
colours. This is related to thematically related bars being plotted
together (21 one sub-categories being grouped into 6 groups, and thus 6
different colors). If I always had every category and sub-category in
each chart I could simply plot each group using an insert command, but
most graphs will not include every sub-category, so I may have instances
of a 4 bars on the graph and each should have a different colour. I
tried using data files with only one record, but this generated an
error. Perhaps I'm going about this the wrong way and there is a simpler
solution.
Any suggestions would be appreciated.
T
--
Trevor Wiens
Federation of Alberta Naturalists

On Fri, 19 May 2006 11:59:52 -0400
Alan G Isaac <aisaac@...> wrote:
> On Fri, 19 May 2006, trevorw apparently wrote:
> > I would like to make a bar chart where individual bars
> > have different colours. This is related to thematically
> > related bars being plotted together (21 one sub-categories
> > being grouped into 6 groups, and thus 6 different colors).
> > If I always had every category and sub-category in each
> > chart I could simply plot each group using an insert
> > command, but most graphs will not include every
> > sub-category
>
> I think you want essentially the code in
> http://sourceforge.net/mailarchive/message.php?msg_id=14951468
> but look as well at the discussion
>
http://sourceforge.net/mailarchive/forum.php?thread_id=9835568&forum_id=23700
>
> hth,
> Alan Isaac
>
Alan,
Thank-you. I managed to modify the code in the thread to allow for the
setting of different styles for each bar.
Thanks
T
--
Trevor Wiens