0
votes

I'm trying to organize the data in the file.dat, such that I could then use gnuplot for bar chart creation. Namely, the current data looks like:

Nodes     Rows             PS       
   30       0          0.16545666      
   30       5          0.13318791      
   30      10          0.13621247     
   30      993         0.17842487   

   31       0          0.26545666      
   31       5          0.23318791      
   31      10          0.23621247     
   31      992         0.27842487  

I would like to create bar charts that would have Nodes (30 and 31) at the x axis, and PS values on the y axis. The data in Rows should be accumulated side-to-size around the base which is Nodes. For instance, the chard would have displayed bar showing PS for Nodes 30, Rows 0, to its immediate right side should be the bar showing PS for Nodes 30, but with Rows 5... then, after Nodes 30 is finished, there should be a gap to 31 (or 5 gaps if 35 is considered), with similar accumulation.

How may I achieve this with gnuplot? In case I should reorganize the data, please consider including the sequence of code I should invoke for a particular organization.

Thanks.

1

1 Answers

0
votes

If you reorganize your data to

30 0 0.16545666 5 0.13318791 10 0.13621247 993 0.17842487
31 0 0.26545666 5 0.23318791 10 0.23621247 992 0.27842487

which is Nodes row_1 ps_1 row_2 pw_2 ..., I think you can plot your data with

set key off
set style data histogram
set style histogram cluster gap 1
set style fill solid border -1
set boxwidth 0.9

plot for [col=3:7:2] "Data.csv" u col:xticlabels(1)

which gives you this plot:

enter image description here