Skip to content

Commit

Permalink
Fix a deprecation warning of matplotlib (#560)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-imamichi authored Sep 20, 2023
1 parent e4804af commit d6cb5fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qiskit_optimization/applications/bin_packing.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def get_figure(self, result: Union[OptimizationResult, np.ndarray]) -> Figure:
"""
import matplotlib.pyplot as plt

colors = plt.cm.get_cmap("jet", len(self._weights))
colors = plt.colormaps["jet"].resampled(len(self._weights))
items_in_bins = self.interpret(result)
num_bins = len(items_in_bins)
fig, axes = plt.subplots()
Expand Down

0 comments on commit d6cb5fc

Please sign in to comment.