From 9a88bdc56b97ce3bb9e078b7b3028ab7ce7999e5 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Thu, 9 May 2024 11:02:28 +0100 Subject: [PATCH] removed deprecated code --- examples/plot_with_custom_color_map.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/plot_with_custom_color_map.py b/examples/plot_with_custom_color_map.py index a5ae7af..e4bd69b 100644 --- a/examples/plot_with_custom_color_map.py +++ b/examples/plot_with_custom_color_map.py @@ -4,7 +4,7 @@ import matplotlib.pyplot as plt import openmc -from matplotlib import cm +import matplotlib from matplotlib.colors import LogNorm from openmc_regular_mesh_plotter import plot_mesh_tally @@ -171,9 +171,7 @@ my_mesh_tally_result = statepoint.get_tally(name="mesh_tally") # makes a discrete color map from a Perceptually Uniform Sequential colormap -cmap = cm.get_cmap( - "viridis", 11 -) # gets 10 discrete colors as we have 10 ticks on the colorbar this should match up +cmap = matplotlib.pyplot.get_cmap(name="viridis", lut=11) plot = plot_mesh_tally( tally=my_mesh_tally_result,