8000 Error with get_cmap using Scatter visualization function · Issue #603 · anyoptimization/pymoo · GitHub
[go: up one dir, main page]

Skip to content

Error with get_cmap using Scatter visualization function #603

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lisasoubirou opened this issue Jun 7, 2024 · 2 comments
Closed

Error with get_cmap using Scatter visualization function #603

lisasoubirou opened this issue Jun 7, 2024 · 2 comments

Comments

@lisasoubirou
Copy link

Hi,
I was trying to plot some results with the Scatter visualization function, but I got the following error:
error
I found this "issue" Re-add matplotlib.cm.get_cmap from matplotlib: matplotlib/matplotlib#28355
Replacing self.cmap = matplotlib.cm.get_cmap(cmap) by self.cmap = plt.get_cmap(cmap) in the Plot.init() function solved my problem. I just wanted to point out this issue with the latest version of matplotlib (3.9)

@tacaswell
Copy link

Please use matplotlib.colormaps.get_cmap() instead.

@blankjul
Copy link
Collaborator

Does the current main branch work for you? There I have already merged a PR (Fixed the Plot Issue #593) where it is the following:

      # the colormap or the color lists to use
      if isinstance(cmap, str):
          self.cmap = matplotlib.pyplot.get_cmap(cmap)
      else:
          self.cmap = cmap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0