diff --git a/qiskit_optimization/applications/bin_packing.py b/qiskit_optimization/applications/bin_packing.py index 6f78d72aa..38b94803a 100755 --- a/qiskit_optimization/applications/bin_packing.py +++ b/qiskit_optimization/applications/bin_packing.py @@ -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()