Skip to content

Commit

Permalink
Merge pull request #3495 from opensim-org/matplotlib_colormap_update
Browse files Browse the repository at this point in the history
Upgrade to use of Matplotlib colormaps in `report.py`
  • Loading branch information
nickbianco authored Jun 23, 2023
2 parents 37b3360 + 7bf2350 commit a54bf40
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Bindings/Python/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ def __init__(self,

if self.colors is None:
self.colors = list()
import matplotlib.cm as cm
import matplotlib
cmap_samples = np.linspace(0.1, 0.9, len(self.refs)+1)
cmap = cm.get_cmap('jet')
cmap = matplotlib.colormaps['jet']
for sample in cmap_samples:
self.colors.append(cmap(sample))

Expand Down Expand Up @@ -621,9 +621,9 @@ def main():
if ref_files != None: refs = ref_files
colormap = args.colormap
if colormap is None: colormap = 'jet'
import matplotlib.cm as cm
import matplotlib
cmap_samples = np.linspace(0.1, 0.9, len(refs)+1)
cmap = cm.get_cmap(colormap)
cmap = matplotlib.colormaps['jet']
for sample in cmap_samples:
colors.append(cmap(sample))

Expand Down

0 comments on commit a54bf40

Please sign in to comment.