[Matplotlib-users] Issue with pyplot

Joe Kington joferkington at gmail.com
Fri Oct 19 15:54:28 EDT 2018


It looks like you might have things configured to default to a different
backend than normal.  Are you running things inside of a notebook?  It
looks like it's trying to run one of the web-based backends by default, and
that backend can't set things up correctly.

What happens if you do:

python -c "import matplotlib; matplotlib.use('tkagg'); import
matplotlib.pyplot as plt"

Or equivalently, try doing:

import matplotlib
matplotlib.use('tkagg')
import matplotlib.pyplot as plt

fig, ax = plt.subplots()
ax.plot(range(10))
plt.show()

If these type of examples work, have a look at which backend you have
things set up to use:
https://matplotlib.org/faq/usage_faq.html#what-is-a-backend.

Hope that helps,
-Joe

On Fri, Oct 19, 2018 at 1:39 PM ulfjoh1523 via Matplotlib-users <
matplotlib-users at python.org> wrote:

> Hi,
> Have a problem that is driving me nuts, and have narrowed it down to
> pyplot,
> and anything depending on pyplot.
>
> This command works fine:
> import matplotlib as mpl
>
> But when I run
> import matplotlib.pyplot as plt
>
> The python icon in docks starts jumping up and down and I get:
> [Error] Failed to load resource: the server responded with a status of 404
> (Not Found) (preact.min.js.map, line 0)
> [Error] Failed to load resource: the server responded with a status of 404
> (Not Found) (preact-compat.min.js.map, line 0)
> [Error] Failed to load resource: the server responded with a status of 404
> (Not Found) (index.js.map, line 0)
>
> Running Python 3.7, Matplotlib 3.0 on a Mac OS High Sierra, and all worked
> fine up till just recently
>
> Any ideas anyone?
>
>
>
> --
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20181019/dbffc8e6/attachment.html>


More information about the Matplotlib-users mailing list