views:

493

answers:

3

I am looking for a way to generate a graph with multiple sets of data on the X-axis, each of which is divided into multiple sets of multiple sets. I basically want to take this graph and place similar graphs side by side with it. I am trying to graph the build a graph of the duration (Y-axis) of the same jobs (0-3) with different configurations (0-1) on multiple servers (each group with the same 8 jobs). Hopefully the following diagram will illustrate what I am trying to accomplish (smaller groupings are separated by pipes, larger groupings by double pipes):

|| 0 1 | 0 1 | 0 1 | 0 1 || 0 1 | 0 1 | 0 1 | 0 1 || 0 1 | 0 1 | 0 1 | 0 1 ||
|| 0   | 1   | 2   | 3   || 0   | 1   | 2   | 3   || 0   | 1   | 2   | 3   ||
|| Server 1              || Server 2              || Server 3              ||

Is this possible with either the GD::Graph Perl module or the matplotlib Python module? I can't find examples or documentation on this subject for either.

+4  A: 
tom10
Thanks. Now, how do I generate _X groups of_ Y groups of bars?
titaniumdecoy
I've edited my answer (both the code and words below it) to address the X groups of Y bars, or am I misunderstanding what you mean by "X groups of Y bars"? The figure shows "5 groups of 7 bars", right?
tom10
You're right, perhaps I worded my problem incorrectly. What I really am looking for is a way to make a graph of X groups of Y groups of Z groups of bars. I will edit my question accordingly.
titaniumdecoy
I think I can figure it out from the code you've provided.
titaniumdecoy
I think I got it now. Just for the completeness of the answer, I modified my code and figure to match better what you're looking for.
tom10
A: 

Recently, I saw a graph that I think does what you want using protovis

I have no experience with the program, but the graph was enlightening and I think would give you want you want.

ezpz
A: 

Hi Tom10,

I am new to python and matplotlib. I also want to create a multi-colored bar chart but from one set of data. Pretty much like what you can see here: http://www.voidspace.org.uk/python/weblog/images/zedchart-bars.jpg but in matplotlib. Your code above is the closest example that I found to this in python and matplotlib. But I can't hack it correctly to make it work the way I need. I wanted to know ask if you can help me on this.

Thanks!

  • Guido
Guido