I'm drawing some bar charts using gnuplot (histogram). I need different and various patterns to fill the bars. Using "fs pattern XX", I can use some patterns, but they are all some lines.
I need the border to be solid line (linetype 1), and the bar be filled by dots. If I change the linetype of pattern, then the border is changed as well. I want to keep the border solid.
Any idea?
I found one terminal which supports dotted patterns: the lua tikz
terminal:
set terminal lua tikz standalone
set output 'dot-pattern.tex'
set boxwidth 0.8 relative
set samples 10
unset key
set yrange [0:11]
plot '+' using 1:($0+1) with boxes lt -1 lw 2 lc rgb '#990000' fillstyle pattern 8
set output
system('pdflatex dot-pattern.tex')
![](https://www.manongdao.com/static/images/pcload.jpg)
With this you could also use custom fill patterns by overwriting a predefined pattern:
set terminal lua tikz standalone header '\tikzset{gp pattern 8/.style={pattern=mypatterh}}'
and you must define a custom pattern, like shown in
Custom and built in TikZ fill patterns.
Using black borders and colored fill pattern is possible with
plot '+' using 1:($0+1) with boxes lc rgb '#990000' fillstyle pattern 8 noborder,\
'+' using 1:($0+1) with boxes lt -1 lw 2