Skip to content Skip to sidebar Skip to footer

'matplotlib' Has No Attribute 'cm' When Deploying An App

I'm trying to deploy an app developed using Dash which use some matplotlib functions. When I run locally the application, it runs smoothly and everything is okay, however, when I d

Solution 1:

You need to import matplotlib.cm for this to work.

import matplotlib.cmcmap= matplotlib.cm.get_cmap('Reds')

Solution 2:

Try:

import matplotlib.pyplot as pltcmap= plt.cm.get_cmap('Reds')

Post a Comment for "'matplotlib' Has No Attribute 'cm' When Deploying An App"