When trying to Plot the function
1/(1 + E^(((e + Quantity[-7.05, "Electronvolts"])
*(Quantity[1, 1/("BoltzmannConstant")]))/T))
I get an incorrect plot looking like
However, if I first evaluate the points with Table and then use ListLinePlot it works as expected
f
, but the following works:f[e_, T_] := 1/(1 + E^(((e + -7.05)*1)/T))
. A good start whenPlot
returns an empty plot is to evaluate the function for some arbitrary values. Try and you'll understand why nothing plots. $\endgroup$ – anderstood Mar 27 '18 at 20:27With[{T = 5000}, Plot[1/(1 + E^(((Quantity[e, "Electronvolts"] + Quantity[-7.05, "Electronvolts"])*(Quantity[1, 1/("BoltzmannConstant")]))/Quantity[T, "Kelvins"])) // Evaluate, {e, 1, 20}]]
$\endgroup$ – J. M.'s ennui♦ Mar 28 '18 at 1:13Plot
returns nothing I always evaluate the function for arbitrary values. That's why, afterPlot
failed, I replacedPlot
withTable
. As you can see, evaluating the function for arbitrary values inTable
works. And when IListPlot
those arbitrary values, the function works. My question was whyPlot
fails when the function successfully evaluates for arbitrary values. $\endgroup$ – Max Coplan Mar 28 '18 at 10:35