Having learned how to make symlog axes in this question, I was interested in the logit scale, the transforms of which are

logit = {
    Function[x, Log[x/(1 - x)]],
    Function[y, Exp[y]/(1 + Exp[y])]

These functions are inverses of one another, as required. Then, trying

Plot[x, {x, 10^-3, 1 - 10^-3}, ScalingFunctions -> logit, Frame -> True]

I get a figure

x with problematic logit axis

There are two problems. First, I get a message in the Messages window,

 Power::infy: Infinite expression 1/0 encountered.

which causes the red frame. Second, only the first set of ticks above 0.5 are there (up to 0.9, further decades are missing)

Weirdly, when I evaluate lots of other expressions immediately after plotting---0, for example---the red frame goes away.

I think the issue may be an imprecise evaluation but using SetPrecision as suggested in that question does not seem to fix the issue.


  • Where are the top half of the ticks? How do I get them to show up?
  • How do I prevent the red frame and divide-by-0 error?
  • $\begingroup$ a work-around: ticks = Quiet@ Append[{logit[[1]]@.9, "0.900", {0.03, 0.}, AbsoluteThickness[.1]}]@ Charting`ScaledTicks[logit, "TicksLength" -> {.03, .02}][ logit[[1]][10^-3], logit[[1]][1 - 10^-3]]; Plot[logit[[1]]@x, {x, 10^-3, 1 - 10^-3}, Frame -> True, FrameTicks -> {{ticks, ticks}, {Automatic, Automatic}}] $\endgroup$
    – kglr
    Aug 11 '21 at 22:32
  • 1
    $\begingroup$ The failing of the ticks is confirmed as a bug by Wolfram support. $\endgroup$
    – evanb
    Aug 16 '21 at 21:22
  • $\begingroup$ The error message + red frame was fixed in 13.0 but the missing ticks were not. $\endgroup$
    – evanb
    Dec 15 '21 at 11: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.