[Python] matplotlib cm.get_cmap(name, num_steps)

Discussão em 'Python' iniciado por Stack, Novembro 30, 2024.

  1. Stack

    Stack Membro Participativo

    My python code uses

    plt.cm.getcmap("coolwarm", num_steps)

    This causes a deprecation warning.

    The get_cmap function was deprecated in Matplotlib 3.7 and will be removed in 3.11. Use matplotlib.colormaps[name] or matplotlib.colormaps.get_cmap() or pyplot.get_cmap() instead.

    however - both suggested methods do not provide a "num_steps" parameter. How do I need to update my statement to be compatible?

    Continue reading...

Compartilhe esta Página