# How can I make hatching filling of plot?

How can I make a hatching filling of the plot?

Like this:

I used another plot with shifting to make the filled area above:

plot := ListLinePlot[
Table[{x1[w], x2[w]}, {w, 1.5, 5, .005}],
Filling -> Top,
FillingStyle -> White
]

fill := ListLinePlot[
Table[{x1[w] - 0.01, x2[w] - 0.02}, {w, 1.5, 5, .005}],
Filling -> Top,
FillingStyle -> LightGray,
PlotStyle -> LightGray
]

Show[fill, plot]


How can I make hatching filling of the filled-plot?

Something like this?

    RegionPlot[y < 1/x && y + 0.3 > 1/(x + 0.3) , {x, 0, 3}, {y, 0, 4},
AxesOrigin -> {0, 0}, Frame -> False, Axes -> Automatic, Mesh -> 20,
MeshFunctions -> {#1 - #2 &}, BoundaryStyle -> None]~Show~
Plot[1/x, {x, 0, 3}]


You can add PlotStyle -> Transparent to the RegionPlot if you don't want the blue filling, and xkcdify it

• Beware! The anti-xkcdification patrol is here! mathematica.stackexchange.com/a/13359/193 Commented Oct 24, 2012 at 22:12
• @belisarius, oh, but it very much fits the context. I'll defend it as if it was Howgartz against any evil wizard
– Rojo
Commented Oct 25, 2012 at 1:39
• You may always sweeten the answer by throwing in some infix notation. Commented Oct 25, 2012 at 12:33
• @shed, if you want to plot the borders of that region, I'd go with ContourPlot[x1[w] == x2[g], {w, 1.5, 5}, {g, 1.5, 5}]
– Rojo
Commented Oct 26, 2012 at 13:55
• @shed you probably should accept this one, or you are still hoping for something different?
– Rojo
Commented Dec 9, 2013 at 22:13

Using Region functionality:

Clear["Global*"];

Show[Plot[1/x
, {x, 0, 1}
, PlotStyle -> Black
, PlotRange -> {0, 7}
, RegionFunction -> Function[{x, y}, x > 0]
, AxesLabel -> TraditionalForm /@ {x[t], y[t]}
, LabelStyle -> Directive[Black, Medium]
]
, RegionPlot[y < 1/x && y > 0.8/x - 0.2
, {x, 0, 1}, {y, 0, 7}
, BoundaryStyle -> None
, PlotStyle -> {Black, HatchFilling[1, 0.1, 12]}
]
]
`