2
$\begingroup$

My code:

t = Table[a/(1 + Exp[- x]) + 1.72/(1 + Exp[- y]) - 1.1 == 0, {a, -7.0, 7.0, 
0.3}];
ContourPlot[t, {x, -10, 10}, {y, -10, 10} ]

The output is like this:

enter image description here

But I want the curves to be colored in a gradient, like GrayTones or different shades of red, say. Thanks!

$\endgroup$
1
$\begingroup$

ContourStyle -> Table[GrayLevel[i/47], {i, 0, 46, 1}] ,

where there are 47 values governed by {a, -7.0, 7.0, 0.3}.

$\endgroup$
  • $\begingroup$ Why 52 and not 50? :) $\endgroup$ – Yan King Yin May 4 '17 at 17:29
4
$\begingroup$

I found a solution:

t = Table[a/(1 + Exp[- x]) + 1.72/(1 + Exp[- y]) - 1.1 == 0, {a, -7.0, 7.0, 
0.3}];
t2 = Table[Hue[i], {i, 0, 1.0, 0.015}];
ContourPlot[t, {x, -10, 10}, {y, -10, 10} , ContourStyle -> t2]

The result looks like this:

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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