# Error in drawing a Piecewise function!

I want to plot the piecewise function (FP), which is define as:

$$FP=\cases{1,&\text{Eta}J\\}$$

where $$J=1$$, $$\text{Gam}=\frac{8}{10}$$, and $$\text{Eta}=\sqrt{B^2+\text{Gam}^2 J^2}$$ According to the ref. "10.1103/PhysRevLett.88.107901" I already know that the resulting curve should be as shown in Fig. (a). But I get Fig. (b).

The code I used is:

J = 1; Gam = 8/10;
Eta = Sqrt[B^2 + J^2 Gam^2];
FP = Piecewise[{{1, Eta < J}, {(1 - Abs[Gam])/2,
Eta == J}, {(Abs[J Gam])/Eta, Eta > J}}] ;
Plot[FP, {B, 0, 3}, Exclusions -> None]


Did I miss something?

• Just from simple algebra, it seems clear to me that the first graph (Fig. (a)) does not match the formula. Note that Plot will not plot isolated points. Those have to be added by the user. The option Epilog is a common way to do that. Commented Aug 7, 2020 at 17:44
• Maybe you want something like ListLinePlot@Table[FP, {B, 0, 3, 1/100}]. It looks close to Fig. (a), but mathematically, it's inaccurate. Commented Aug 7, 2020 at 17:48

Maybe you want this?:

Plot[FP, {B, 0, 3}, Exclusions -> None,
PlotPoints -> {Automatic, {0.6}}]


Or more generally,

excl = Values@Solve[And @@ # && 0 < B < 3, B] & /@
VisualizationExpandExclusions[FP, {B}, Automatic] //
Flatten //
Union;
Plot[FP, {B, 0, 3}, Exclusions -> None,
PlotPoints -> {Automatic, excl}]
`