0

In the attached image I want to have hatched lines in the entire region to the left the dashed line i.e. in the region before x = -4. How can this be done?

enter image description here

Aim
  • 389
  • 6
  • 20
  • Hatch patterns in gnuplot are limited. Just in case you are interested in hatching arbitrary areas with more flexible hatch patterns, here is a (complicated) solution: https://stackoverflow.com/a/63471784/7295599 – theozh Jul 02 '21 at 06:22

1 Answers1

1
set object 1 rectangle from graph 0,0 to first -4, graph 1
set object 1 fillstyle pattern 1 fillcolor "cyan"
set xrange [-5:5]
set grid x y
plot sin(x)

enter image description here

Ethan
  • 13,715
  • 2
  • 12
  • 21