Right now I have this:
input graph input sarith beginfig(1) draw begingraph(3cm,2cm) gdata("data1.d", v, path p; augment p (v1,0); augment p (v1,v2); augment p (v1 Sadd "1",v2); augment p (v1 Sadd "1",0); gfill p--cycle withcolor .8white; gdraw p--cycle; ); endgraph; endfig; end
This builds a bar chart with grey bars with my test data set. However I need it colored, very much like the one in this question: How to create a bar chart in which the y-axis is expressed in percents?
There will be 3 different colors, representing algorithms, each of these colors will have 3 bars: best, worst and average, this will be manually put into the data set file.
How can I do this? Can I label each bar with a name? Maybe putting a string inside the bar? Like "Best" and so on? Also, can I set the x-axis as a string space? I mean, i wanted the algorithm's name as a lower label, then the three bars on top of it.
I'm really new to metapost, so forgive me my noobness.
Checking on how nice the bar chart on the solution I posted, this could be done in pgfplots. However I have no knowledge on this package. If anyone knows how to do what I want using pgfplots, I'd study and use it.