I came across this bizarre behaviour whilst noodling around - a change in 'Plot' results...
testPlot1 = Plot[Log[HarmonicNumber[n]],
{n, 1, 5}];
testPlot2 = Plot[Log[HarmonicNumber[n]],
{n, 1, 43}];
Show[testPlot1, PlotRange -> {{0, 5}, {0, 1}}]
Show[testPlot2, PlotRange -> {{0, 5}, {0, 1}}]
The line moves away from the origin, crossing the n
line increasingly far to the right, and giving no negative output - it just vanishes at the n
line.
At first I thought it happened exclusively for n>=43
, but actually, it seems to happen randomly for different domain ranges. Using Table
gives the correct result.
What's going wrong, and how do I fix it?
PlotRange
at all, but inShow
you are using specificPlotRange
. So why do you expect the results to look the same? $\endgroup$