0

I am trying to replicate the clustered histogram from Clustered bar plot in gnuplot by using gnuplot.

I use the gnuplot script like this:

set terminal pdf enhanced
set output 'bar.pdf'

set style data histogram
set style histogram cluster gap 1

set style fill solid border rgb "black"
set auto x
set yrange [0:*]
plot 'info.dat' using 2:xtic(1) title col, \
        '' using 3:xtic(1) title col, \
        '' using 4:xtic(1) title col, \
        '' using 5:xtic(1) title col, \
        '' using 6:xtic(1) title col
set out

and info.dat is exactly like this:

Broswer Video   Audio   Flash   HTML    JavaScript
IE      30%     10%     25%     20%     15%
Chrome  20%     5%      35%     30%     10%

Unfortunately, the generated file has error like this:

enter image description here

As you can see, main errors are, the key box, x axis titles, y axis range won't show. I suspect that is there anything specific data file format I don't know? Or is it because of something else? Thank you so much for your help.

liaoming999
  • 769
  • 8
  • 14
  • Your code works fine for me in wxt and pdf terminal. What it your operating system and gnuplot version? Have you tried a `reset session` at the beginning? – theozh Oct 29 '20 at 17:14
  • I tried reset session but no luck. I use MacBook and the gnuplot version is 5.4.0_1, no upgrade needed – liaoming999 Oct 29 '20 at 17:46
  • hmmm, strange. And if you try in other terminals wxt, qt, x11, ...? It could be something pdf-specific. – theozh Oct 29 '20 at 19:15
  • 1
    have you checked this? Maybe the same issue....? https://stackoverflow.com/q/62992375/7295599 – theozh Oct 29 '20 at 19:22
  • thank you so much for your help. in fact it is a similar issue. one of the dependency package has bugs and cause this problem. just degrade that package and it works – liaoming999 Oct 30 '20 at 07:39
  • Does this answer your question? [Overlapping letters in tics and labels gnuplot 5.4](https://stackoverflow.com/questions/62992375/overlapping-letters-in-tics-and-labels-gnuplot-5-4) – theozh Sep 16 '22 at 12:32

0 Answers0