5
$\begingroup$

Unable using 13.1.0 for Mac OS X ARM (64-bit) also seen on 12.3.0 for Mac OS X x86 (64-bit) (May 10, 2021), and MMA version 13.1 Windows 10 to suppress pink box output around ListLogLinearPlot and warning message. Interestingly, this occured on the second time the code was run, but not the first time the code was run, such that some parameter in the ListLogLinearPlot routine is not being properly reinitialized. The trace for the error, when it occurs is:

Message[N::precsm, 15.9546]
N[{5, 10, 50, 100, 500, 1000}, 15.9546]

What this is doing is converting 55 decimal place integers into machine numbers, and it does not help to input them as integers with infinite precision, they get converted to machine numbers of <16 place precision anyway. It may have to do with having extended precision y-values in the plot at the same time, see below. What gives?

enter image description here

Nothing, block structure, Quiet, etc. works to suppress error when I use $MinPrecision = 55; only changing that to $MinPrecision=0; which I cannot use in the remainder of my code, works as a preamble to the following code example

$MinPrecision = 55;
xy = {{5.`55., 
    0.0440577197159802285287831435698347138365015230619050622630249999\
9977411452125`55.}, {10.`55., 
    0.0397767351603008920529547774037456110013244540775730484884499999\
9979606327965`55.}, {15.`55., 
    0.0379735868537246582793143777075686109229095658861249757409999999\
9980530808444`55.}, {20.`55., 
    0.0403678334462315117337176898869294620204074803390080127334749999\
9979303269795`55.}, {30.`55., 
    0.0425471352074908671223890338905870945655115670604601536368499999\
9978185934116`55.}, {40.`55., 
    0.0339015764395359449229476472678576372358931627517952220530499999\
9982618542507`55.}, {60.`55., 
    0.0305579901756859750115614756458075708653225091517590606670499999\
9984332810946`55.}, {90.`55., 
    0.0280861246163397472556438416252205575127934902403037556423999999\
9985600145114`55.}, {120.`55., 
    0.0250470435300903996040446249187500507581140925931280303826249999\
9987158292677`55.}, {180.`55., 
    0.0223841158985241735674763525197601764701238934759563732787749999\
9988523585041`55.}, {240.`55., 
    0.0183718123819042096738129465733000968254391091559129796155749999\
9990580707167`55.}, {360.`55., 
    0.0146878968019123678250178253397199344135782283144445660884999999\
9992469463644`55.}, {480.`55., 
    0.0129026605646067588901884229915182025478628257672824013484749999\
9993384760543`55.}, {720.`55., 
    0.0092485984333992917727449640045634871571677543329571678337749999\
9995258211051`55.}, {1440.`55., 
    0.0055288587148662002463278480750327883199079022029169382918499999\
9997165334689`55.}};
ListLogLinearPlot[xy, ImageSize -> Medium]

Other than reinitializing Mathematica by quitting the kernel and then rerunning code, which gets me one, and only one error free plot, the only other thing I seem to be able to do is distract it, for example, by adding ListPlot[{1, 2}] afterwords, which for some reason, does work. However, when the second plot run is ListLogLinearPlot[{1,2}] rather than ListPlot[{1,2}] although the error box around the first plot is cleared, the same error box, message and trace occurs for the second 'ListLogLinearPlot` command.

Therefore, there is an incomplete clearing of some code setting, flag or parameter in the ListLinearLogPlot routine that is properly cleared when ListPlot is run, at least for the two Versions on two different Mac OS, one with an Intel processor and the other with an M1 chip, as well as a v13.1 MMA Windows 10 OS.

Because this is annoying, I offered a bounty for confirmation of this bug and/or the best fix or recommendation offered.

P.S. Another error I have seen concerns tick marks, with no numerical axes labeling occurring, but it was inconsistent, so there is something rather seriously wrong with the runtime code.

$\endgroup$
2
  • $\begingroup$ @cvgmt I have to edit the post, but I am curious as to which four characters you edited, please let me know for my future postings. $\endgroup$
    – Carl
    Nov 20, 2022 at 19:22
  • 1
    $\begingroup$ I only enclose your code by ``` your code ``` $\endgroup$
    – cvgmt
    Nov 21, 2022 at 0:25

2 Answers 2

5
+100
$\begingroup$

As noted by @DanielHuber, this appears to be a bug. To work around the bug, you can use the following:

ListLogLinearPlot[xy, ImageSize -> Medium] /. 
  (WorkingPrecision -> x_) :> (WorkingPrecision -> Max[x, $MinPrecision])

enter image description here

Effectively, this is replacing the WorkingPrecision->15.9546 setting of the ticks of the graphic with WorkingPrecision->$MinPrecision (if that is higher) to ensure that you don't get the error message.

As for why you can't block it with Quiet and friends: The issue is that the error doesn't occur during the evaluation of ListLogPlot[...], but only when the result is converted to boxes to be displayed. And since the Quiet wrappers etc. are already gone at that point, the message will be printed.

$\endgroup$
2
  • $\begingroup$ As I said, I tried Quiet, it did not work. I tried Block it didn't work. I tried $\$$MinPrecision=55;...code...$\$$MinPrecision=0;...ListLogLinearPlot... It didn't work. I will try your other suggestion above and get back to you. $\endgroup$
    – Carl
    Nov 20, 2022 at 23:42
  • $\begingroup$ Indeed, your patch appears to work. I must wait 20 hours to award a bonus, site rules. $\endgroup$
    – Carl
    Nov 20, 2022 at 23:47
1
+50
$\begingroup$

Correction: If you run the following the first time, everything works as expected. Only during a second run the bug appears.

Try the following:

xy = {{5.`55, 
    0.0440577197159802285287831435698347138365015230619050622630249999\
9977411452125`55}, {10.`55, 
    0.0397767351603008920529547774037456110013244540775730484884499999\
9979606327965`55}, {15.`55, 
    0.037973586853724658279314377707568610922909565886124975740999999 \
9980530808444`55}, {20.`55, 
    0.0403678334462315117337176898869294620204074803390080127334749999\
9979303269795`55}, {30.`55, 
    0.0425471352074908671223890338905870945655115670604601536368499999\
9978185934116`55}, {40.`55, 
    0.0339015764395359449229476472678576372358931627517952220530499999\
9982618542507`55}, {60.`55, 
    0.0305579901756859750115614756458075708653225091517590606670499999\
9984332810946`55}, {90.`55, 
    0.0280861246163397472556438416252205575127934902403037556423999999\
9985600145114`55}, {120.`55, 
    0.0250470435300903996040446249187500507581140925931280303826249999\
9987158292677`55}, {180.`55, 
    0.0223841158985241735674763525197601764701238934759563732787749999\
9988523585041`55}, {240.`55, 
    0.0183718123819042096738129465733000968254391091559129796155749999\
9990580707167`55}, {360.`55, 
    0.0146878968019123678250178253397199344135782283144445660884999999\
9992469463644`55}, {480.`55, 
    0.0129026605646067588901884229915182025478628257672824013484749999\
9993384760543`55}, {720.`55, 
    0.0092485984333992917727449640045634871571677543329571678337749999\
9995258211051`55}, {1440.`55, 
    0.0055288587148662002463278480750327883199079022029169382918499999\
9997165334689`55}};
ListLogLinearPlot[xy, ImageSize -> Medium]

enter image description here

$\endgroup$
8
  • 1
    $\begingroup$ That does not include the $MinPrecision=55 preamble, and does not work with it included on my platform. Try it first with that command included, please. $\endgroup$
    – Carl
    Nov 18, 2022 at 12:46
  • 1
    $\begingroup$ Try this, run the routine twice. I have found that it does not occur after a single run but rather the second time, also see new text in my question above. For whatever reason, and on the two Mathematica versions on vastly different Mac hardware processors, the error seems to be an uncleared runtime code switch isolated so far to the ListLogLinearPlot routine. $\endgroup$
    – Carl
    Nov 20, 2022 at 19:58
  • 1
    $\begingroup$ You are right, the second time the error appears. I think this is a bug. Please report it to: [email protected] and let us know if they answer something interessting. $\endgroup$ Nov 20, 2022 at 21:45
  • 1
    $\begingroup$ Would you mind changing your post a bit? Someone read it and assumed it is correct and downvoted my question. Of course, random downvoting from people who do not understand a post is something that cannot be avoided, but keep in mind that I upvoted your post not because it is correct, but as an encouragement for those who would contribute and do at least some testing. $\endgroup$
    – Carl
    Nov 22, 2022 at 8:09
  • 1
    $\begingroup$ [CASE:4986152] Bug report. The response from [email protected] reads in part "It does indeed appear that ListLogLinearPlot is not behaving properly. I have forwarded an issue report to our developers with the information you provided." $\endgroup$
    – Carl
    Nov 24, 2022 at 4:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.