Can't use matplotlib with Docker

Hi all,

I’m currently using the Docker installation of FEniCS and can’t manage to plot with matplotlib correctly.

When running the FEniCS container with the command fenicsproject run the message After calling 'plt.show()' you can access matplotlib plots at http://localhost:3000 is displayed. Though the code below doesn’t plot anything at this adress. Does anyone has an idea ? Thanks!

from fenics import *
import matplotlib.pyplot as plt
mesh = UnitCubeMesh(4, 4, 4)
plot(mesh)
plt.show()

Perhaps this link is helpful?

Hi thanks for the link !
This should work but the thing is I use to be able to visualise the plots in my internet browser without having to use what’s suggested here.