I have been trying to combine two plots using Show. Everything looks fine, but the arrow from one of the plots does not show. What am I doing wrong here?

qw = 
  Plot[y /. Solve[(x/20)^2 + (y/10)^2 == 1], {x, -36, 35}, 
    AspectRatio -> Automatic, 
    PlotRange -> {{-37, 35}, {-16, 16}}, 
    PlotStyle -> {RGBColor["#123c69"]}, 
    Ticks -> Automatic, 
    Axes -> True];

Aq = 
  Plot[-a/((x^4)) - b, {x, -21, -35}, 
    PlotRange -> {{-36, -21}, {-6.5, -9.5}}, 
    PlotStyle -> {RGBColor["#ac3b61"]}, 
    Epilog -> 
       Arrow[{{-35, -((3151 Sqrt[7])/1250)}, {-35.7, -6.640033236810056}}]}];

Show[qw, Aq]
  • 4
    $\begingroup$ Use Show[qw, Aq, Epilog -> ...] instead of putting the Epilog inside of the second Plot function. $\endgroup$ – Carl Woll May 25 '19 at 15:18

The options are always taken from the first object in Show. For example, you've specified PlotRange for both but the one that's being used with Show is the first one. It works like this for all options, including Epilog. You'll see the arrow if you change the order:

Show[Aq, qw]

but then, of course, the plot range will not be the same anymore. That's why it is sometimes necessary or useful to supply options to Show, which overrides the options given by the first argument. In this case,

Show[qw, Aq, 
 Epilog -> {RGBColor["#ac3b61"], 
   Arrow[{{-35, -((3151 Sqrt[7])/
         1250)}, {-35.7, -6.640033236810056}}]}]

shoud do it, as Carl noted in a comment.

| improve this answer | |

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