0

I was using the code as DensityPlot[Sin[x + y], {x, 0, 2}, {y, 1, 3}, PlotLegends -> Automatic, ColorFunction -> "Rainbow", ImageSize -> Small] which gives the output as enter image description here

And another code is DensityPlot[Sin[x - y], {x, 0, 2}, {y, 1, 3}, PlotLegends -> Automatic, ColorFunction -> "Rainbow", ImageSize -> Small] which gives the output as enter image description here

We can see that the BarLagends for both images are not at the equal footing here, but I need these legends on equal footing so that I would be able to compare them. Is it possible to do so? Or can we mark the ticks on legends manually? Please help me!

Actually, first I made a 3D-plot of these two functions, Sin[x+y] and Sin[x-y], in a single frame. So it was easy to compare them but due to some reasons I can't use a 3D plot in my work. Then I thought it would be another good option to compare them.

0 Answers0