3D objects cannot be plotted with Matplotlib backend

Issue #1087 new
Henrik Finsberg created an issue

The following code

import dolfin
dolfin.plot(dolfin.UnitCubeMesh(2, 2, 2))

Produces the following error message

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/henriknf/miniconda3/envs/pulse_new/lib/python3.7/site-packages/dolfin/common/plotting.py", line 438, in plot
    return _plot_matplotlib(object, mesh, kwargs)
  File "/Users/henriknf/miniconda3/envs/pulse_new/lib/python3.7/site-packages/dolfin/common/plotting.py", line 282, in _plot_matplotlib
    ax.set_aspect('equal')
  File "/Users/henriknf/miniconda3/envs/pulse_new/lib/python3.7/site-packages/matplotlib/axes/_base.py", line 1281, in set_aspect
    'It is not currently possible to manually set the aspect '
NotImplementedError: It is not currently possible to manually set the aspect on 3D axes
  • FEniCS version 2019.1
  • Matplotlib version 3.1.1
  • Python 3.7.3
  • macOS Mojave

Comments (3)

  1. Amnon Harel

    Run into the same bug. Python 3.6.8, Ubuntu 18.04.1, brand new installation (mapplotlib also 3.1.1, FEniCS 2019.1.0)

  2. Wei Huang

    Please try to degrade your Matplotlib version by running conda install matplotlib=3.0.3 or pip3 install matplotlib=3.0.3

    It works for me. I tested it.

  3. Log in to comment