pmocz / latticeboltzmann-python

Lattice Boltzmann fluid simulation
https://medium.com/swlh/create-your-own-lattice-boltzmann-simulation-with-python-8759e8b53b1c
GNU General Public License v3.0
173 stars 48 forks source link

Matplotlib warning #2

Closed bkmgit closed 2 years ago

bkmgit commented 2 years ago

Get the following warning

latticeboltzmann.py:90: MatplotlibDeprecationWarning: You are modifying the state of a globally registered colormap. This has been deprecated since 3.3 and in 3.6, you will not be able to modify a registered colormap in-place. To remove this warning, you can make a copy of the colormap first. cmap = mpl.cm.get_cmap("bwr").copy()
  cmap.set_bad('black')

Using Python 3.10.5 with Matplotlib 3.5.2

pmocz commented 2 years ago

Thank you for fixing this deprecation issue!