From: Jon on
Hi All

I'd like to plot contour lines consisting of a solid line with short diagonal lines on one side, something like this

-------------------- <---(solid line along the contour)
///////////////// <---(short diagonal lines on one side)

I'm making a plot of experimental data and I want to show that the region on one side of the contour is allowed while the other side is not.

I don't want resort to shading the entire region because it is quite a busy figure and the colouring will make it difficult to read.

Is there a ContourStyle which does this?
If not, can I create my own ContourStyle which can?

Thanks in advance!

Jon

From: Bob Hanlon on

Not exactly what you asked for but easy to do:

ContourPlot[{
Cos[x] + Cos[y] == 1/2,
Cos[x] + Cos[y] == 0.35},
{x, 0, 4 Pi}, {y, 0, 4 Pi},
ContourStyle -> {
Directive[Thick, Blue],
Directive[Thick, Red,
AbsoluteDashing[5]]}]

ContourPlot[{
Cos[x] + Cos[y] == 1/2,
Cos[x] + Cos[y] == 0.65},
{x, 0, 4 Pi}, {y, 0, 4 Pi},
ContourStyle -> {
Directive[Thick, Blue],
Directive[Thick, Red,
AbsoluteDashing[5]]}]


Bob Hanlon

---- Jon <jkparry(a)hotmail.com> wrote:

=============
Hi All

I'd like to plot contour lines consisting of a solid line with short diagonal lines on one side, something like this

-------------------- <---(solid line along the contour)
///////////////// <---(short diagonal lines on one side)

I'm making a plot of experimental data and I want to show that the region on one side of the contour is allowed while the other side is not.

I don't want resort to shading the entire region because it is quite a busy figure and the colouring will make it difficult to read.

Is there a ContourStyle which does this?
If not, can I create my own ContourStyle which can?

Thanks in advance!

Jon




From: David Park on
A simple solution might be to combine two contour lines. The first might be
drawn in a black style. The second contour line might be for a value that is
just above (or below) the first line and drawn as a thick colored line. The
trick would be to get the value spacing and second line thickness correct so
the first line showed on the edge of the second line. And the black line
should be drawn after the thick colored line.

Hatching might be more difficult. You would have to be able to parametrize
the contour line and then traverse it, drawing the short hatch lines at
equal intervals. To make it look really proper you would have to find the
length of the line, parametrize on arc length as a parameter, and pick an
even number of intervals. A bunch of work, but perhaps a general routine
could be devised.


David Park
djmpark(a)comcast.net
http://home.comcast.net/~djmpark/


From: Jon [mailto:jkparry(a)hotmail.com]

Hi All

I'd like to plot contour lines consisting of a solid line with short
diagonal lines on one side, something like this

-------------------- <---(solid line along the contour)
///////////////// <---(short diagonal lines on one side)

I'm making a plot of experimental data and I want to show that the region on
one side of the contour is allowed while the other side is not.

I don't want resort to shading the entire region because it is quite a busy
figure and the colouring will make it difficult to read.

Is there a ContourStyle which does this?
If not, can I create my own ContourStyle which can?

Thanks in advance!

Jon