Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I make hatching filling of plot

Like this:

hatching filling plot

I use another one plot with shifting to make 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]

plot

How can I make hatching filling of fill-plot?

share|improve this question
up vote 17 down vote accepted

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}]

Mathematica graphics

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

enter image description here

share|improve this answer
    
+1 for the xkcdification – Eli Lansey Oct 24 '12 at 20:33
1  
@belisarius, oh, but it very much fits the context. I'll defend it as if it was Howgartz against any evil wizard – Rojolalalalalalalalalalalalala Oct 25 '12 at 1:39
4  
You may always sweeten the answer by throwing in some infix notation. – Yves Klett Oct 25 '12 at 12:33
1  
@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}] – Rojolalalalalalalalalalalalala Oct 26 '12 at 13:55
1  
@shed you probably should accept this one, or you are still hoping for something different? – Rojolalalalalalalalalalalalala Dec 9 '13 at 22:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.