2
$\begingroup$

I drew a contour plot using the option "RegionFunction" and it gave me the below result.

enter image description here

The code for this plot is

NeutrinoTrident[MZprime_, s24squad_] := (s24squad/MZprime);
UpperBound = 1/370;
cp100 = ContourPlot[
NeutrinoTrident[MZprime, s24squad], {MZprime, 100, 1000}, {s24squad,
0, 1}, FrameLabel -> {Style[
 "\!\(\*SubscriptBox[\(M\), \(Z'\)]\)[GeV]", FontSize -> 16], 
Style["\!\(\*SuperscriptBox[\(sin\), \
\(2\)]\)\!\(\*SubscriptBox[\(\[Theta]\), \(24\)]\)", FontSize -> 16]},
BaseStyle -> {FontFamily -> "Times", FontSize -> 14}, 
RegionFunction -> 
Function[{MZprime, s24squad}, 
NeutrinoTrident[MZprime, s24squad] <= UpperBound], 
PlotRange -> {{100 - 10^-10, 1000}, {10^-3, 1}}, 
ScalingFunctions -> {"Log", "Log"}, Contours -> {10}, 
ContourShading -> {LightBlue}]

And I wanted to check out the boundary line when the given equation is equal to the boundary value(UpperBound). And the result is

enter image description here

The code for the second plot is

cp101 = ContourPlot[
NeutrinoTrident[MZprime, s24squad] == UpperBound, {MZprime, 100, 
1000}, {s24squad, 0, 1}, 
FrameLabel -> {Style["\!\(\*SubscriptBox[\(M\), \(Z'\)]\)[GeV]", 
 FontSize -> 16], 
Style["\!\(\*SuperscriptBox[\(sin\), \
\(2\)]\)\!\(\*SubscriptBox[\(\[Theta]\), \(24\)]\)", FontSize -> 16]},
BaseStyle -> {FontFamily -> "Times", FontSize -> 14}, 
ScalingFunctions -> {"Log", "Log"}, 
PlotRange -> {{100 - 10^-10, 1000}, {10^-3, 1}}]

And then I combined the former with the latter and I saw the result of combining both.

enter image description here

The code for the final is

Show[cp100, cp101]

And then I found out something quite weird from the final plot. The allowed region(LightBlue) should start from the given boundary line of the second plot but there is a blank space between the boundary line and the starting of the allowed region. How can I fix the first plot in order for the starting of the first plot to be able to start from the boundary line of the second plot?

$\endgroup$
1
3
$\begingroup$

Just change the PlotRange setting in ContourPlot that produces cp100 to

PlotRange -> {{100 - 10^-10, 1000}, {10^-3, 1}, All}

to get

Show[cp100, cp101]

enter image description here

Actually, you don't need cp101 at all. You can add the option BoundaryStyle->Blue when you create cp100 to get the final result in a single step:

ContourPlot[NeutrinoTrident[MZprime, s24squad], {MZprime, 100, 1000}, {s24squad, 0, 1}, 
 FrameLabel -> {Style[
    "\!\(\*SubscriptBox[\(M\), \(Z'\)]\)[GeV]", FontSize -> 16], 
   Style["\!\(\*SuperscriptBox[\(sin\), \(2\)]\)\!\(\*SubscriptBox[\
\(θ\), \(24\)]\)", FontSize -> 16]}, 
 BaseStyle -> {FontFamily -> "Times", FontSize -> 14}, 
 RegionFunction -> Function[{MZprime, s24squad}, 
    NeutrinoTrident[MZprime, s24squad] <= UpperBound], 
 PlotRange -> {{100 - 10^-10, 1000}, {10^-3, 1}, All}, 
 ScalingFunctions -> {"Log", "Log"}, Contours -> {10}, 
 ContourShading -> {LightBlue}, BoundaryStyle -> Blue]

enter image description here

$\endgroup$
1
  • $\begingroup$ Thank you so much! This is exactly what I wanted to get. $\endgroup$ – lhcQFT Mar 6 '19 at 12:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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