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

Possible Duplicate:
Filling a polygon with a pattern of insets

I have a RegionPlot (and sometimes a regular Plot) where I'd like to shade two different parts of it two different ways. Since the final output will be printed in black and white, I'd really like to do this in an old fashioned way: with hash lines.

I was mainly wondering if there is some built in way to do this without developing it from scratch.

share|improve this question

marked as duplicate by Sjoerd C. de Vries Jun 30 '12 at 20:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Hi texasAUtiger, welcome to Mathematica.SE! I'm closing this question (which is a very good one!) because it has already been asked and answered. In this way we'll keep the answers concentrated and better findable. Your question will serve as an additional entry point. – Sjoerd C. de Vries Jun 30 '12 at 20:24
up vote 15 down vote accepted

For RegionPlot you could use the MeshFunctions option for this, for example

 RegionPlot[Sin[x y] > 0, {x, -Pi, Pi}, {y, -Pi, Pi}, 
  MeshFunctions -> {#1 + #2 &},
  Mesh -> {Range[-2 Pi, 2 Pi, Pi/20]}, PlotStyle -> None],
 RegionPlot[x^2 + y^4 < 2, {x, -Pi, Pi}, {y, -Pi, Pi}, 
  MeshFunctions -> {#1 - #2 &},
  Mesh -> {Range[-Pi, Pi, Pi/20]}, PlotStyle -> None]]

Mathematica graphics

share|improve this answer
Thanks and sorry for duplicating a previous post. I looked, but must not have used just the right search terms. – JohnD Jun 30 '12 at 21:43
@texas That's okay, they are often not easy to find. We do appreciate your trying however. :-) – Mr.Wizard Jul 1 '12 at 6:53
Very nice! Is there a way to get away with only one RegionPlot command? Similar to how PlotStyle accepts a list of specifications for each region being plotted. – Eckhard Feb 3 '14 at 23:31

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