[Matplotlib-users] Matplotlib plots display as blank in interactive mode with no error messages - (one) Solution

Thomas Caswell tcaswell at gmail.com
Sun May 19 18:54:45 EDT 2019


Indeed, sorry for the misdirection.

If you look in your terminal do you see a bunch of tracebacks?

The problem is that Python read \0 in a string literal as an escaped 0 byte
(aka \x00) which fails to parse with with mathtex and latex.  If you make a
raw string (r"$\0$") python won't interpret the escape character, but both
mathtex and latex still fail as \0 is not a valid command it latex.  These
exceptions are being raised as part of the draw process which cause it to
fail which makes it look like interactivity is lost because the updated
image is not shipped to the browser.

We should sort out a better way to surface those exceptions, the problem is
that they happen asynchronously so it is not clear where they should be
raised...

Tom

On Sun, May 19, 2019 at 3:51 AM FilipPersson <filip at ownit.nu> wrote:

> Hi Tom,
> I'm not sure if it's related. I'm using nbAgg. It acme automatically when I
> installed and I haven't changed it. Their plots go black. Not all my plots
> go crazy when I do the escape character error, only the interactive ones
> when re-running.
>
>
>
> --
> Sent from:
> http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-users
>


-- 
Thomas Caswell
tcaswell at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20190519/ca23fbe8/attachment.html>


More information about the Matplotlib-users mailing list