Skip to content

Commit

Permalink
Merge pull request #270 from VlachosGroup/cmap-patch
Browse files Browse the repository at this point in the history
fix import of get_cmap
  • Loading branch information
JacksonBurns authored May 16, 2024
2 parents efdfc4b + 305b89b commit e170435
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion aimsim/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
except ImportError:
pass # aimsim_core does not include this

__version__ = "2.2.0"
__version__ = "2.2.1"
6 changes: 5 additions & 1 deletion aimsim/tasks/cluster_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
from os.path import dirname

import matplotlib.pyplot as plt
try:
from matplotlib.cm import get_cmap
except: # noqa: E722
from matplotlib.pyplot import get_cmap
from matplotlib.colors import rgb2hex
import yaml

Expand Down Expand Up @@ -54,7 +58,7 @@ def _extract_configs(self):
self.plot_settings = dict()
self.plot_settings["cluster_plot"] = {
"cluster_colors": [
rgb2hex(plt.cm.get_cmap("tab20", self.n_clusters)(cluster_id))
rgb2hex(get_cmap("tab20", self.n_clusters)(cluster_id))
for cluster_id in range(self.n_clusters)],
"response": "Response",
}
Expand Down

0 comments on commit e170435

Please sign in to comment.