1
$\begingroup$

I have used the DensityPLot to show two functions $f_1$ and $f_2$ in different regions. I want to combine them using the Show function. The problem is, the colors are not consistent in the two different plots. For example, regions where the magnitude of the function $f_1$ is equal to one is shown by red, while regions where the magnitude of the function $f_2$ is equal to one is shown by blue. How can I solve this issue?

$\endgroup$
4
  • 3
    $\begingroup$ You should set the scaling manually in both plots. It can be done by specifying ColorFunction -> ColorData[{"TemperatureMap", {min, max}}] where min and max are the endpoints of your domain. $\endgroup$
    – C. E.
    Nov 21, 2019 at 18:50
  • $\begingroup$ It doesn't work. @C.E. and still shows different colors for the same values in different plots $\endgroup$
    – Marco
    Nov 21, 2019 at 23:09
  • 1
    $\begingroup$ Please post your code and I’ll tell you why it doesn’t work. $\endgroup$
    – C. E.
    Nov 22, 2019 at 1:44
  • 1
    $\begingroup$ You might want to leverage ColorFunctionScaling -> False with some manual plot-range and scaling controls. $\endgroup$
    – Silvia
    Nov 22, 2019 at 4:51

0

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.