0
$\begingroup$

Here is my code to use If condition with PLot:

Plot[If[0 < Y2[ArcTan[n],ArcTan[0.3]] < 11 && 0.8 < Yhcc[ArcTan[n],ArcTan[0.3],-0.099]< 1.2
    && -3 < YHtt[ArcTan[n],ArcTan[0.3],-0.099] < 1 && 0 <Y1[ArcTan[n],ArcTan[0.3]] < 1,
    sigma[350,ArcTan[n],ArcTan[0.3],-0.099,10,-10,10]],{n,0.7,1},
    Frame-> True,FrameLabel->{"tan Beta " , " sigma  fb"}, PlotStyle->Thick]

As seen 4 conditions are applied before plotting sigma. The code works fine and gives a straight line for sigma.

Now how to use ListPlot instead with If condition to make a scatter plot for sigma, like for instance that in [arXiv:1312.1935], FIG. 3 . (a) or (b) ?

Edit

To make my question more clear I'll right here an example of the definition of sigma and the functions inside the condition: Let sigma has the form:

sigma[beta_,alpha_,Y4_] := c^2/(256*Pi) * (1/2) ( Yhcc[beta,alpha,Y4]/ m ) * Abs[A]^2

Where c is a strong coupling constant, m is a mass, A is a loop function and Yhcc[beta,alpha,Y4]= (m/173) * Cos[Beta] * Cos[alpha] + 2 Y4 * Sin[Alpha] is a coupling. The condition is that 0.8 <Yhcc[beta,alpha,Y4]< 1.2. Of course in the first code the number of conditions and the number of independent parameters are more, but I think this is clear that edit is just an example.

$\endgroup$
  • $\begingroup$ Please provide the definition of sigma, so that readers can run the code. $\endgroup$ – bbgodfrey May 28 '16 at 5:12
  • $\begingroup$ @ bbgodfrey. in my MMA file sigma has so long definition and conclude many other functions, this will be tidy here. I think to test the code you can define any arbitrary function sigma[x,y,z,s,l] .. $\endgroup$ – S.S. May 28 '16 at 5:36
  • $\begingroup$ I added my question .. $\endgroup$ – S.S. May 28 '16 at 5:57
  • 1
    $\begingroup$ Generate data=Table[{x,f[x]},{x,x1,x2,dx}] with the given conditions and use ListPlot[data]. $\endgroup$ – Sumit May 28 '16 at 10:57
  • $\begingroup$ Can't I make this command faster in MMA: Table[{ms, Beta, Alpha, op, yy, zz, jj, If[0.8 < Yhcc[Beta, Alpha, op] < 1.2, sigma[ms, Beta, Alpha, op, yy, zz, jj], 0]}, {ms, 350, 400, 10}, {Beta, 0.01, Pi/2, 0.1}, {Alpha, -Pi/2, Pi/2, 0.1}, {op, -5, 5, 1}, {yy, 2, 10, 1}, {zz, -10, -5, 1}, {jj, -2, 10,1}] .. it takes so much time .. $\endgroup$ – S.S. May 28 '16 at 12:54

Your Answer

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

Browse other questions tagged or ask your own question.