2
$\begingroup$

I want to put two different ListContourPlots atop of each other using Show[plot1,plot2]. But I want the top layer to be somewhat transparent.

I am considering two options:

The first one, is it possible to have a ListContourPlot not with a fully filled area but having the area consist of shaded or criss cross lines.

The other idea is to set a value for Opacity, but right now I cannot find out how to have my cod look like

plot1=ListContourPlot[data,  PlotStyle -> Opacity[0.5]]

But it this one does not work for some reason.

Can you help me?

$\endgroup$
4
  • 1
    $\begingroup$ Try ContourShading and ContourStyle. Examples can easily be found on the Docs page for ListContourPlot. $\endgroup$ Sep 2, 2016 at 13:10
  • $\begingroup$ But how do I add transparency to the Plot whit these options? $\endgroup$ Sep 2, 2016 at 13:24
  • $\begingroup$ Plot has PlotStyle and FillingStyle, please read the Docs! $\endgroup$ Sep 2, 2016 at 13:27
  • $\begingroup$ Welcome! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour and check the faqs! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$
    – user9660
    Sep 2, 2016 at 16:25

1 Answer 1

3
$\begingroup$

It took some deep digging and I found a solution here.

Generate two plots:

plot1 = ListContourPlot[
  Table[Sin[i + j^2], {i, 0, 3, 0.1}, {j, 0, 3, 0.1}], 
  ColorFunction -> "SunsetColors"]
plot2 = ListContourPlot[
  Table[Sin[i + j], {i, 0, 3, 0.1}, {j, 0, 3, 0.1}], 
  BaseStyle -> Directive[Opacity[0.3]]]

enter image description here

In the second the opacity is introduced via BaseStyle -> Directive[Opacity[0.3]].

Now, Show doesn't work so use Overlay:

Overlay[{plot1, plot2}]

enter image description here

which does not look clear at all, so maybe a different way to present your data would be more suitable.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.