Line chart and bar graph in gnuplot

Does anyone know how I can put a line chart for one set of values ​​on top of a bar chart in GNU Plot? My chart is working fine, but I have no idea how to add a line chart on different columns.

I am 100% lost! I can do this with excel quite easily, but it doesn’t look so good.

+4
source share
1 answer

With data file Data.csv :

 9.0447e-01 7.6771e-01 3.6151e-01 9.9169e-01 7.0212e-01 4.4109e-02 9.1423e-01 7.7540e-05 

and script:

 set boxwidth 0.6 relative set style fill solid plot "Data.csv" u 0:1 with boxes, "" u 0:2 with lines 

you will end up with this plot:

enter image description here

Hope this is what you were looking for. Of course, much more can be done to improve the appearance of the plot.

+5
source

Source: https://habr.com/ru/post/1390894/


All Articles