1
$\begingroup$

When I run

ListContourPlot[Table[10^(x + y), {x, -3, 3, 0.1}, {y, -3, 3, 0.1}], 
ColorFunction -> (ColorData["Rainbow"][(Log10@# + 4)/2] &)]

Mathematica throws 'Blend is not a Graphics order'.

However,

ListDensityPlot[Table[10^(x + y), {x, -3, 3, 0.1}, {y, -3, 3, 0.1}], 
ColorFunction -> (ColorData["Rainbow"][(Log10@# + 4)/2] &)]

works fine. What's wrong?

$\endgroup$
  • $\begingroup$ works fine (no error message) in version 12 (wolfram cloud) $\endgroup$ – kglr Sep 5 at 9:47
  • $\begingroup$ puzzling.. The question is not how to fix the issue; but in version 9 (windows 10) adding the option ColorFunctionScaling -> False fixes it. $\endgroup$ – kglr Sep 5 at 9:50
  • $\begingroup$ If you Trace[ListContourPlot[...], _Blend, TraceInternal -> True] (and the same for ListDensityPlot) both generate Blend["Rainbow", Indeterminate] but somehow ListDensityPlot does not complain. $\endgroup$ – kglr Sep 5 at 9:56

Your Answer

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

Browse other questions tagged or ask your own question.