# Common scale for List of ContourPlots [closed]

Given a list of ContourPlot:

cp1 = ContourPlot[Sin[x] + Sin[y], {x, -2 \[Pi], 2 \[Pi]}, {y, -2 \[Pi], 2 \[Pi]}];
cp2 = ContourPlot[2*(Sin[x] + Sin[y]), {x, -2 \[Pi], 2 \[Pi]}, {y, -2 \[Pi], 2 \[Pi]}];
cpList = {cp1,cp2}


How can I make the contours (and color steps) for all elements of cpList the same, whilst being able to specify the List of contour magnitudes manually (e.g. Range[-2, 2, 0.5])?

Contours->Range[-4, 4, 0.5] (better than above) does part of the work, but the color-scales arent equal:

## closed as off-topic by Feyre, MarcoB, happy fish, Edmund, JungHwan MinNov 29 '16 at 4:02

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Feyre, MarcoB, happy fish, Edmund, JungHwan Min
If this question can be reworded to fit the rules in the help center, please edit the question.

• Contours? E.g. Contours -> Range[-2, 2, 0.5] – corey979 Nov 23 '16 at 12:29
• @corey979 That's part of it, but the color-scale is not equal. – DPF Nov 23 '16 at 12:31
• @DPF You can use ColorFunction for that – Sascha Nov 23 '16 at 12:32

To make the color scaling equal you have to supply your own ColorFunction and turn off ColorFunctionScaling. Add for instance the options

ColorFunction -> (Blend[{Red, Blue}, Rescale[#, {-3, 3}]] &),
ColorFunctionScaling -> False


to both plots and you get something like

where I added plot legends via PlotLegends -> Automatic for reference

• That's a good way to do it. The only thing I'd like to have in addition to your solution is equal Legends for all Plots – DPF Nov 23 '16 at 12:52
• you mean a common legend shared by both plots? – Sascha Nov 23 '16 at 12:55
• I mean each plot has its own legend, but showing the same number-range and colorfunction. – DPF Nov 23 '16 at 12:56
• by the way: is there a possibility, to Rescale the existing ColorFunctions? – DPF Nov 23 '16 at 13:02
• @DPF you can create your own custom BarLegend for instance BarLegend[{{Red, Blue}, {-3, 3}}, Range[-3, 3, 0.5]] and use it inside each plot – Sascha Nov 23 '16 at 13:04