Skip to content

Commit 12a10cd

Browse files
committed
remove get_cmap from matplotlib
1 parent c5a8e2c commit 12a10cd

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

docs/source/io/xst_reading.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ enables the calibration table used during the BST observation).
133133
134134
To compare the result, the selected BST data, the beamformed data
135135
using the calibration table and without using it (setting
136-
``calibration="none"```) are displayed together:
136+
``calibration="none"`) are displayed together:
137137
138138
.. code-block:: python
139139

nenupy/astro/sky.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@
3939
import dask.array as da
4040
from dask.diagnostics import ProgressBar
4141

42+
import matplotlib as mpl
4243
import matplotlib.pyplot as plt
4344
from matplotlib import patheffects
4445
from matplotlib.colorbar import ColorbarBase
4546
from mpl_toolkits.axes_grid1.inset_locator import inset_axes
4647
import warnings
47-
from matplotlib.cm import get_cmap
4848
from matplotlib.ticker import LinearLocator
4949
from matplotlib.colors import Normalize
5050

@@ -346,7 +346,7 @@ def plot(self, **kwargs):
346346
warnings.simplefilter("ignore")
347347
cb = ColorbarBase(
348348
cax,
349-
cmap=get_cmap(name=cmap),
349+
cmap=mpl.colormaps[cmap],
350350
orientation='vertical',
351351
norm=Normalize(
352352
vmin=vmin,

nenupy/io/xst.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
from matplotlib.colorbar import ColorbarBase
4040
from matplotlib.ticker import LinearLocator
4141
from matplotlib.colors import Normalize
42-
from matplotlib.cm import get_cmap
4342
from mpl_toolkits.axes_grid1.inset_locator import inset_axes
4443
import dask.array as da
4544
from dask.diagnostics import ProgressBar
@@ -1792,7 +1791,7 @@ def save_png(
17921791
)
17931792
cb = ColorbarBase(
17941793
cax,
1795-
cmap=get_cmap(name=cmap),
1794+
cmap=mpl.colormaps[cmap],
17961795
orientation="vertical",
17971796
norm=Normalize(
17981797
vmin=nf_image_min,

0 commit comments

Comments
 (0)