I am trying to make a contour plot of a gravitational potential, consisting of a sum og different potential.s.
I would like to plot them separately with a BarLegend that has the same colors for the same values of the potential. What I got now is that the colors in the two plots does not represent the same potential energy. Here's an example:
contplotb =
ContourPlot[1/Sqrt[R^2 + z^2 + 1], {R, 0, 10}, {z, -10, 10},
PlotRange -> All,
PlotLegends -> BarLegend[Automatic, All, LegendFunction -> "Panel"]]
contplotd =
ContourPlot[3/Sqrt[R^2 + z^2 + 1], {R, 0, 10}, {z, -10, 10},
PlotRange -> All,
PlotLegends -> BarLegend[Automatic, All, LegendFunction -> "Panel"]]
As you may see, the colors represent different values, but it would be nice to have them represent the same
Any tips are much apreciated, and please include code if you have a solution, I'm very new to Mathematica.
Thanks Espen
ColorFunction -> ColorData[{"Rainbow", {0, 3}}], ColorFunctionScaling -> False
on both plots $\endgroup$