Message Boards Message Boards

0
|
2882 Views
|
3 Replies
|
1 Total Likes
View groups...
Share
Share this post:

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

Posted 7 years ago

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
3 Replies

I do get some fillings:

version 1

version 2

POSTED BY: Gianluca Gorni

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

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

POSTED BY: František Prinz
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract