# Is the range of this plot correct using *ScalingFunctions -> "Log"*?

I use DiscretePlot for a function $$f$$ and the result is

As I see, the range of the function includes negative values. Then, when I use ScalingFunctions -> "Log", I obtain

Here, the negative range of the function is given by positive values. Is this true?

• What version are you using? With v12.1.1, Clear["*"]; DiscretePlot[10 (-1)^n, {n, 0, 10}, ScalingFunctions -> "Log"] correctly displays the result of 10 for only the even values of n since for odd values of n the Log is complex. Since your option is displayed in Red, it appears that it is not a valid option in your version. Was there some error message? Oct 23, 2020 at 17:03
• @BobHanlon Thanks. No, there is not an error. Then, what other commands I can use to get a correct result? The version is 10.4. Oct 23, 2020 at 17:22
• People here generally like users to post code as Mathematica code instead of just images or TeX, so they can copy-paste it. It makes it convenient for them and more likely you will get someone to help you. You may find this meta Q&A helpful Oct 24, 2020 at 1:04
• The red highlighting usually indicates that the option is unknown for the function. (I don't have V10.4 to check.) Oct 24, 2020 at 1:12

If I correctly understand it, you want to build a log-plot of a fuction taking negative values. In this case the ScalingFunctions -> "Log" option does not do the job. This can be done as follows. Compare
DiscretePlot[(-1)^n*n!, {n, 2, 7}, PlotRange -> All]

DiscretePlot[Piecewise[{{Log[Max[(-1)^n*n!, 0]], (-1)^n*n! >=
`