Menu

Histogram cluster lable

Help
romkazor
2014-12-16
2014-12-23
  • romkazor

    romkazor - 2014-12-16

    Hello, sorry for my english.
    I use gnuplot 4.6.6 (centos)

    When i use histogram with cluster and try to sign values on column they are on the x-axis, but i need link to columns.
    See here (https://www.dropbox.com/s/09vwf8z9yvhmm4f/output.png?dl=0)

    reset
    set datafile separator ";"
    set encoding utf8
    set term png size 1024,600
    set output "/tmp/output.png"
    set tic scale 0
    set style line 81 lt 0 lc rgb "#808080" lw 0
    set style line 1 lc rgb '#0060ad' lt 1 lw 3.2 pt 7 pi -1 ps 1.3
    set style line 2 lc rgb '#00ff00' lt 1 lw 3.2 pt 7 pi -1 ps 1.3
    set style line 3 lc rgb '#ff8000' lt 1 lw 3.2 pt 7 pi -1 ps 1.3
    set style data histograms
    set style histogram cluster gap 1
    set style fill solid
    set boxwidth 0.7
    set grid ytics back ls 81
    set key off
    plot "/tmp/test.dat" using 2:xtic(1) t "All" ls 1, \ "/tmp/test.dat" u 3:xtic(1) t "Line 1" ls 2, \ "/tmp/test.dat" using 1:2:2 w labels font ",7", \ "/tmp/test.dat" using 1:3:3 w labels font ",7"

    Big thanks!

     
  • romkazor

    romkazor - 2014-12-22

    Nobody use cluster histogram?!

     
  • Ethan Merritt

    Ethan Merritt - 2014-12-22

    I do not understand the question.
    If you want to move the labels so they appear above the columns, try

    plot "/tmp/test.dat" using 2:xtic(1) t "All" ls 1,  \
         "/tmp/test.dat" u 3:xtic(1) t "Line 1" ls 2,   \
         "/tmp/test.dat" using 1:2:2 w labels font ",7"  offset -1,2  , \
         "/tmp/test.dat" using 1:3:3 w labels font ",7"  offset  1,2
    
     
    • romkazor

      romkazor - 2014-12-23

      Offset is partly true. But offset will not correctly if quantity of columns on x-axis will increase or decrease. I thinked there is a way unit lable to column, not the coordinates
      Thanks for answer.

       

      Last edit: romkazor 2014-12-23

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.