2
$\begingroup$

I have this code.

ComplexPlot[
  z,
  {z, -1 - I, 1 + I},
  FrameLabel -> {"Re[z]", "Im[z]"},
  ColorFunction -> (Hue[#8 / (2 Pi), 1, 1]&),
  ColorFunctionScaling -> False
]

When z is the first argument of the ComplexPlot function, it (somewhat) works as intended.

1

But, when I change the expression to a single value rather than z, such as 1...

2

...the red is less saturated than it should be. I set the color function to Hue[#8 / (2 Pi), 1, 1]&. #8 is Arg[1], which is 0. So this should be computed as Hue[0, 1, 1]: 3. But this is not the color we see. Why is anything but the hue of this plot being manipulated? For that matter, why do the colors get less saturated as they get farther from 0 on the z plot? And how can I prevent all of this?

P.S. For whatever reason, 0 and Infinity are the only numbers plotted as pure red as they should be. In fact, infinities of all arguments are still plotted as red, even though their arguments are not zero.

$\endgroup$

closed as off-topic by LCarvalho, m_goldberg, MarcoB, Alex Trounev, garej Jun 7 at 9:51

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – LCarvalho, m_goldberg, MarcoB, Alex Trounev, garej
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    $\begingroup$ You have to consider the sfunc as well. If you don't want it to mess with the shading, set it to None: ColorFunction -> {Hue[#8/(2 Pi), 1, 1] &, None} $\endgroup$ – C. E. Jun 3 at 20:09
  • $\begingroup$ That would be this question's answer. $\endgroup$ – Grant Gryczan Jun 3 at 20:32
2
$\begingroup$

Posting my comment as an answer:

You have to consider the sfunc as well. If you don't want it to mess with the shading, set it to None: ColorFunction -> {Hue[#8/(2 Pi), 1, 1] &, None}

More information about sfunc is in the documentation.

$\endgroup$

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