Message Boards Message Boards

Put one plot in the display of two plots in the background?

GROUPS:

I need to have in the graphics the contour lines hidden behind the gray topography: plot

I use following code:

Show[ContourPlot[
  pa[y, x] - p[y] //. anstrom //. {h -> 1000, a -> 1500, 
    u -> 15}, {x, -50000, 50000}, {y, 0, 10000}, 
  ContourShading -> None, ImageSize -> Large, 
  FrameLabel -> {{HoldForm[y[m]], None}, {HoldForm[x[m]], None}}, 
  PlotPoints -> 50, Contours -> 10, ContourLabels -> True], 
 Plot[contour2 //. {a -> 1500, h -> 1000}, {x, -50000, 50000}, 
  PlotRange -> {Full, {0, 10000}}, PlotStyle -> Black, 
  ImageSize -> Large, AxesOrigin -> {-50000, 0}, Filling -> {Axis}, 
  FillingStyle -> {Opacity[1.0, Gray]}]]

where the normal Plot is just the lower gray topography.

I tried to change the order and vary options like opacity, nothing helps.

Thanks for every help.

POSTED BY: František Prinz
Answer
2 months ago

Here is a simulation with two choices of order:

cp = ContourPlot[
  Cos[x/10000] + Sin[y/10000], {x, -50000, 50000}, {y, 0, 10000}, 
  ContourShading -> None, ImageSize -> Large, Contours -> 10, 
  ContourLabels -> True, 
  FrameLabel -> {{HoldForm[y[m]], None}, {HoldForm[x[m]], 
     None}}]; pl = 
 Plot[3000/(1 + (x/5000)^4), {x, -50000, 50000}, PlotRange -> All, 
  PlotStyle -> Black, ImageSize -> Large, AxesOrigin -> {-50000, 0}, 
  Filling -> {Axis}, FillingStyle -> {Opacity[1], Gray}];
Show[cp, pl]
Show[pl, cp]

Neither is what you need?

POSTED BY: Gianluca Gorni
Answer
2 months ago

Unfortunately, in this code in both cases the filing vanished...

POSTED BY: František Prinz
Answer
2 months ago

I do get some fillings:

version 1

version 2

POSTED BY: Gianluca Gorni
Answer
2 months ago

Group Abstract Group Abstract