In launching a program of thousands of lines of code that I have been writing for a few months, during the calculation phase we see temporary errors that capturing the screen are as follows:

enter image description here

then the zeros decrease, up to the last error phase:

enter image description here

although in the first lines I tried to hide them.

It must be said that once the calculations are completed, no error is obtained and everything is as desired:

enter image description here

Unfortunately I can not reproduce a minimum code to show this anomaly because I believe it is linked to the complexity of the code. I wanted to ask if anyone knows any strategy to make sure that no errors are displayed during the calculation phase, but that the desired result is shown only at the end.

I tried with "Quiet" but it does not work in this case.

Thank you!


1 Answer 1


The problem is the {0}, e.g.

  {ListPlot[Prime[Range[25]]/2]}, {0}}]

enter image description here

To supress the error messages and output use Quiet and Check, e.g.

    {ListPlot[Prime[Range[25]]/2]}, {0}}], ""]

Instead of "" you could use a suitably sized blank graphic.

You may not need Quiet if you have switched off messages with Off.

  • $\begingroup$ @Tem Yes, you can wrap the Show object in Check as above. $\endgroup$ Feb 22, 2018 at 14:33

Your Answer

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

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