[Matplotlib-users] howto plt.subplots (projection='3d')?

Benjamin Root ben.v.root at gmail.com
Mon Oct 2 14:13:28 EDT 2017


You have to import the mplot3d toolkit first. That causes the 3d projection
to get registered.

On Mon, Oct 2, 2017 at 2:03 PM, Neal Becker <ndbecker2 at gmail.com> wrote:

> Any way to use plt.subplots for 3d?
>
> This doesn't work:
>   fig, axs = plt.subplots(nrows=opt.rcv_paths, ncols=1, sharex=True,
> subplot_kw=dict(projection='3d'))
> ...
>   File "/home/nbecker/.local/lib/python3.6/site-
> packages/matplotlib/projections/__init__.py", line 67, in
> get_projection_class
>     raise ValueError("Unknown projection '%s'" % projection)
> ValueError: Unknown projection '3d'
>
> _______________________________________________
> 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/20171002/19836a5b/attachment.html>


More information about the Matplotlib-users mailing list