Cannot set border line width for bar graph columns

I draw a histogram with gnuplot. And I would like to set the width of all the borders of the strokes.

I set the style of my histograms using:

set style fill solid border -1

after that I would like to set the line width for border , but set style fill solid border -1 has no linewidth option.

Do you know any solution to this problem? Maybe there is another way to set the border width for the histograms?

+4
source share
3 answers

I would not use set style fill solid border -1 (or better, noborder ), but rather set a specific line type that can be used to configure boxes , for example.

 bw=0.1 n=500 bin(x,width) = width*floor(x/width) + bw/2.0 set boxwidth bw set style line 2 lc rgb 'gray30' lt 1 lw 2 set style fill pattern 5 plot 'rnd.dat' using (bin($1,bw)):(1./(bw*n)) smooth frequency with boxes ls 2 

Here, the squares are drawn using dark gray and line width 2.

enter image description here

+3
source

Away from the elegant solution, but you can reduce the relative size of the border line width by making it bigger (and vice versa), for example. halve the width of the border line, double the size of the plot, font size and all other line widths.

0
source

Width can be set without creating a style in the first place. The line width can be set directly using:

  plot 'data' u 1:2 w boxes lw 3 
0
source

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


All Articles