I´m new here and this is my first question, hope my Problem is described properly according to our rules in here...
I´ve got a data file (datafile.dat) which is used to create several plots (see below):
temp name1 name2
10 1000 1200
22 800 750
50 250 200
100 80 82
107 5 3
What I want to do is to create a plot with the values in the second and third column plotted with boxes. On the x-axis the names these values refer to shall be displayed. In Addition it shall be possible to give each of the boxes a specific colour. An additional Advantage would be that the solution can also be used in a Loop (because the original data file contains a lot more columns...). In the end I want the graph to look something like this: Desired Layout of the plot.
In order to get this I tried different things I found searching the Internet (see below). I am running gnuplot 5 on Windows with the following command file:
xticlabels If I try this e.g. for column 2 this doesn´t work:
plot 'datafile.dat' u 2:xticlabels(columnhead(2))
Using an external utility Didn´t work at all, failure message was produced
Stats Looks like a pretty good solution if I store the output in a variable. But I can´t get my code working (see below):
reset
set terminal postscript eps size 15 cm, 15 cm colour enhanced dashed "Times, 22"
set output "test.pdf"
stats 'datafile.dat' using 2
b = STATS_sum
plot 'datafile.dat' u 2:xticlabels(b) every ::1
reset
What can I do to create the desired output from the data file above? I tried the Points mentioned above in many different combinations. Suggestion 1, Suggestion 2, Suggestion 3 are further Topic-related ideas to solve the Problem but I got none of these working. Can please anyone help me to get a solution? Any hints will be highly appreciated!!!
Thanks in advance!!!
Michael
EDIT: I found out that this question was already asked from someone else three years ago: Axis label and column header ...Is there maybe a solution today? Also: Question