1
$\begingroup$

I need to fill a region in my plot (The white area in the bottom between the two graphs going to the x axis. I cannot figure out a way to do this, please help.

mbbNH[s12sq_, s13sq_, m1_, dmatm_, dmsol_, α_, β_] := Abs[(1 - s12sq) (1 - s13sq) m1 + Exp[I α] s12sq (1 - s13sq) Sqrt[m1^2 + dmsol] + Exp[I β] s13sq Sqrt[m1^2 + dmatm]];
NO = LogLogPlot[
  {
   mbbNH[0.272, 0.02436, m1, 2.593 10^-3, 6.80 10^-5, π, 0],
   mbbNH[0.346, 0.02436, m1, 2.593 10^-3, 8.02 10^-5, π, π],
   mbbNH[0.346, 0.02436, m1, 2.593 10^-3, 6.80 10^-5, 0, 0]
   },
  {m1, 10^(-4), 1},
  PlotRange -> {{10^(-4), 1}, {10^(-4), 1}},
  PlotStyle -> Directive[Opacity[1], Red],
  Filling -> {1 -> {3}, 1 -> {2}, 2 -> {3}},
  AxesLabel -> {HoldForm[Subscript[m, light] "(eV)"], HoldForm[Subscript[m, ββ] "(eV)"]},
  PlotLabel -> None, LabelStyle -> {GrayLevel[0]},
  GridLines -> {
    {0.23},
    {{0.061, Red}, {0.165, Red}, {0.11, Blue}, {0.52, Blue}, {0.19, Green}, {0.45, Green}, {0.2, Purple}, {0.4, Purple}, {0.3, Gray}, {0.9, Gray}}
    },
  GridLinesStyle -> Directive[Gray, Dashed]
  ]

enter image description here

I am trying to get it like the this, but uniformly colored red:

enter image description here

$\endgroup$
5
  • 1
    $\begingroup$ Related: (40146), (14696), (130050), (109442), (20721), (59076), (96521). Also, you might want to read the documentation of Filling. $\endgroup$
    – Lukas Lang
    Commented May 5, 2018 at 8:12
  • $\begingroup$ Did you even look at the linked questions? The first one covers exactly that... $\endgroup$
    – Lukas Lang
    Commented May 5, 2018 at 9:54
  • $\begingroup$ Of course I looked at them. I had already looked through the forum before I posted. They do not work with what I have. $\endgroup$
    – Macempty
    Commented May 5, 2018 at 10:18
  • $\begingroup$ In that case it might be a good idea to show that you've done so (i.e. show a few attempts and how they differ from what you want ) - this makes it easier to help you efficiently $\endgroup$
    – Lukas Lang
    Commented May 5, 2018 at 10:21
  • $\begingroup$ I got it to work when I use piecewise method. However, some of the shaded areas overlap, so they are not all the same color, some stronger colored than others. $\endgroup$
    – Macempty
    Commented May 5, 2018 at 10:37

1 Answer 1

2
$\begingroup$

One possible solution:

mbbNH[s12sq_, s13sq_, m1_, dmatm_, dmsol_, α_, β_] := Abs[(1 - s12sq) (1 - s13sq) m1 + Exp[I α] s12sq (1 - s13sq) Sqrt[m1^2 + dmsol] + Exp[I β] s13sq Sqrt[m1^2 + dmatm]];
NO = LogLogPlot[
  Evaluate[{Min@Append[#, Piecewise[{{10^(-5), 0.0015 <= m1 <= 0.0085}}, Infinity]], Max@#} &@{
     mbbNH[0.272, 0.02436, m1, 2.593 10^-3, 6.80 10^-5, π, 0],
     mbbNH[0.346, 0.02436, m1, 2.593 10^-3, 8.02 10^-5, π, π],
     mbbNH[0.346, 0.02436, m1, 2.593 10^-3, 6.80 10^-5, 0, 0]
     }],
  {m1, 10^(-4), 1},
  PlotRange -> {{10^(-4), 1}, {10^(-4), 1}},
  PlotStyle -> Directive[Opacity[1], Red],
  Filling -> {1 -> {2}},
  AxesLabel -> {HoldForm[Subscript[m, light] "(eV)"], HoldForm[Subscript[m, ββ] "(eV)"]},
  PlotLabel -> None, LabelStyle -> {GrayLevel[0]},
  GridLines -> {
    {0.23},
    {{0.061, Red}, {0.165, Red}, {0.11, Blue}, {0.52, Blue}, {0.19, Green}, {0.45, Green}, {0.2, Purple}, {0.4, Purple}, {0.3, Gray}, {0.9, Gray}}
    },
  GridLinesStyle -> Directive[Gray, Dashed]
  ]
 ]

Mathematica graphics

The idea is to take the Min/Max of all the curves, where we add a Piecewise function with a constant value of $10^{-5}$ between $0.0015$ and $0.0085$ to the functions where Min is applied.

$\endgroup$
4
  • $\begingroup$ Thanks @Mathe172, but what I am trying to achieve is just getting the blank bit incorporated into the plot, so it will all be the same color, and then change Opacity to [0]. The lines are just there atm so I can see what I'm doing. I am trying to get it like the this, but uniformly colored red. $\endgroup$
    – Macempty
    Commented May 5, 2018 at 10:58
  • $\begingroup$ Third function is replaced with {mbbNH[0.346, 0.02436, m1, 2.593 10^-3, 6.80 10^-5, 0, 0], Piecewise[{{mbbNH[0.346, 0.02436, m1, 2.593 10^-3, 6.80 10^-5, 0, 0], 0.0015 <= m1 <= 0.0085}}]}}, $\endgroup$
    – Macempty
    Commented May 5, 2018 at 11:07
  • $\begingroup$ @Macempty like this? $\endgroup$
    – Lukas Lang
    Commented May 5, 2018 at 11:13
  • $\begingroup$ Fantastico! Thanks a lot for your help with this! :-) $\endgroup$
    – Macempty
    Commented May 5, 2018 at 11:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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