2

I am trying to get double x axis by Overlay. But with the following code:

Lp3prime6 = Interpolation[{{-20.49645390070922, 17.292993630573246},
    {-19.929078014184398, 17.133757961783438},
    {-19.078014184397162, 16.974522292993626},
    {-17.872340425531917, 16.65605095541401},
    {-16.95035460992908, 16.496815286624198},
    {-15.886524822695035, 16.17834394904458},
    {-14.326241134751774, 14.585987261146492},
    {-11.631205673758865, 11.878980891719742},
    {-9.21985815602837, 9.490445859872608},
    {-6.950354609929079, 7.261146496815282},
    {-5.106382978723406, 5.350318471337577},
    {-3.687943262411345, 3.9171974522292956}}];
Lp3prime62 = 
 Plot[{Log10[
    2.3723973672982666`*^37 1/10^(
     2 Lp3prime6[Log10[10^z]])]}, {z, -20, -4}, 
  FrameLabel -> {"\!\(\*SubscriptBox[\(m\), \(\[Phi]\)]\)", 
    "\!\(\*SubsuperscriptBox[\(d\), \(e\), \((2)\)]\)"}, 
  Filling -> Top, FillingStyle -> RGBColor[0.5, 0.5, 0.5, 0.15], 
  Frame -> True, 
  FrameTicks -> {{LogTicks[0, 35, TickLabelStep -> 5, 
      ShowMinorTicks -> True], None}, {LogTicks, None}}, 
  PlotRange -> {{-9, -7}, {0, 35}}, PlotStyle -> Opacity[0.9, Gray]]
Lp3prime63 = 
 Plot[{Log10[
    2.3723973672982666`*^37 1/10^(
     2 Lp3prime6[Log10[6.58 10^-10 10^Log10[10^z]]])]}, {z, 
   Log10[10^-9/(6.58 10^-10)], Log10[10^-7/(6.58 10^-10)]}, 
  Filling -> Top, FillingStyle -> RGBColor[0.5, 0.5, 0.5, 0.15], 
  Frame -> True, 
  FrameTicks -> {{None, 
     LogTicks[0, 35, TickLabelStep -> 5, 
      ShowMinorTicks -> True]}, {None, LogTicks}}, 
  PlotRange -> {{Log10[10^-9/(6.58 10^-10)], 
     Log10[10^-7/(6.58 10^-10)]}, {0, 35}}, 
  PlotStyle -> Opacity[0.9, Gray]]
Overlay[{Lp3prime63, Lp3prime62}]

I merely get the below result:

enter image description here

and

enter image description here and

enter image description here

So, can someone help me? thank you.

Hunter
  • 31
  • 2

1 Answers1

3

Here is a simple example with 2 x-axis, one with numbers the others with fractions of Pi:

Plot[Sin[x], {x, 0, 2 Pi}, Frame -> True, 
 FrameTicks -> {{Automatic, Automatic}, {Pi {0, 2/4, 1, 3/2, 2}, 
    All}}]

enter image description here

Daniel Huber
  • 51,463
  • 1
  • 23
  • 57