Skip to main content
edited tags
Link
kglr
  • 403.4k
  • 18
  • 501
  • 959
Bumped by Community user
Bumped by Community user
Bumped by Community user
Source Link
user26718
  • 386
  • 1
  • 3

Combining two consecutive density plots

I would like to combine two density plots using Show[ ] with different consecutive x-values so that the color scheme and legends match. For example,

plot01 = DensityPlot[2 Sin[x y], {x, 0, 1}, {y, 0, 3}, ColorFunction -> "M10DefaultDensityGradient", PlotLegends -> Automatic] plot02 = DensityPlot[2 Sin[x y], {x, 1, 3}, {y, 0, 3}, ColorFunction -> "M10DefaultDensityGradient", PlotLegends -> Automatic] 

As such, plot01 has a scheme based on the range {0.0, 2.0} while plot02 has one based on the range {-2.0, 2.0}. I would like both of them to have a color scheme and legend based on {-2.0, 2.0} so that when they are combined, the colors match smoothly. How do I make this happen?