I'm trying to plot a bar chart with multiple bars on each point of the x axis, and a line chart on the same graph showing the ratio of the two columns over the top. I'm getting the bars to render fine, but getting the error "line 22: warning: Skipping data file with no valid points" for the line plot.
I'm guessing this is due to setting the plot style to histogram, but I'm not sure. Do I need to change it again to do the line plot? I've seen some examples online of single bars with a line plot over them, but I'm not sure about doing a clustered bar chart and a line. Can anyone help out please?
EDITED:
I've stripped my code and data file down from what I was using in my original post, to hopefully improve clarity and get rid of any excess data that might be messing things up.
The code I'm now using is as follows;
set terminal png size 800,500 enhanced font "Times,12"
set output 'test.png'
red = "#FF0000"; green = "#00FF00"; blue = "#0000FF"; skyblue = "#87CEEB";
set key right top
set yrange [0:0.2]
set ylabel "Percentage"
set y2range [0:1.0]
set y2label "Ratio"
set style data histogram
set style histogram cluster gap 1
set style fill solid
set boxwidth 0.9
set xtics format ""
set ytics
set y2tics
set grid ytics
set title "Some title"
plot "mydata.dat" using ($2/100.0):xtic(1) title "Group 1" linecolor rgb green, \
'' using ($3/100.0) title "Group 2" linecolor rgb blue , \
'' using 1:($2/$3) with lines axis x1y2
And the mydata.dat file looks like this;
# File of data
A 12.3 17.6
B 11.7 16.2
C 11.1 15.9
D 8.3 12.1
E 9.2 10.5
But I'm still getting a error message "myfile.gnuplot", line 22: warning: Skipping data file with no valid points
