0
$\begingroup$

I want to append a label showing the units for the quantity $|m_{ee}|$ plotted on the y-axis; i.e I want the FrameLabel to read $|m_{ee}|(eV)$ on y-axis.

Please help me. Here is the code that I am using:

mee[β_, α_, c12_, c13_, s12_, s13_,m1_, m2_, m3_] := √(m1 c12^2 c13^2 + 
      m2 s12^2 s13^2 Cos[2 α Degree] + 
      m3 s12^2 c13^2 Cos[2 β Degree])^2 + (m2 s12^2 c13^2 Sin[
       2 α Degree] + m3 s13^2 Sin[2 β Degree])^2;
Tab23 = Table[{β, 
    mee[β, Random[Real, {-25, 25}], 
     Random[Real, {0.851, 0.8062}], Random[Real, {0.9897, 0.9877}], 
     Random[Real, {0.5241, 0.5915}], Random[Real, {0.1429, 0.1562}], 
     Random[Real, {0, 0.001}], Random[Real, {0.00832, 0.00892}], 
     Random[Real, {0.0486, 0.0512}]]}, {β, -45, 45, 1 Degree}];
P23 = ListPlot[Tab23, PlotRange -> {0, 0.1}, 
  FrameLabel -> {β, Abs[Subscript[m, ee]]}, 
  FrameStyle -> Directive[Black, Thick, Bold, 13], Frame -> True]
$\endgroup$
4
  • $\begingroup$ You mean like this? Change to FrameLabel -> {\[Beta], Row[{Abs[Subscript[m, ee]], (eV)}]}, and see if it does what you want. screen shot !Mathematica graphics but I would use MaTeX myself for these types of Labels as Latex looks better. $\endgroup$
    – Nasser
    Dec 6, 2022 at 6:19
  • $\begingroup$ Thank you so much. It worked. Really grateful for your reply. $\endgroup$ Dec 6, 2022 at 6:29
  • $\begingroup$ If I want to put eV within square bracket what should I do? $\endgroup$ Dec 6, 2022 at 7:01
  • $\begingroup$ You could try FrameLabel -> {\[Beta], Row[{Abs[Subscript[m, ee]], "[", eV, "]"}]}, and see. another option is FrameLabel -> {\[Beta], Row[{Abs[ Subscript[m, ee]], \[LeftAngleBracket]eV\[RightAngleBracket]}]}, !Mathematica graphics $\endgroup$
    – Nasser
    Dec 6, 2022 at 7:03

0

Your Answer

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

Browse other questions tagged or ask your own question.