Skip to content

Commit

Permalink
remove get_cmap from matplotlib
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanLoh committed Jun 20, 2024
1 parent c5a8e2c commit 12a10cd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/source/io/xst_reading.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ enables the calibration table used during the BST observation).
To compare the result, the selected BST data, the beamformed data
using the calibration table and without using it (setting
``calibration="none"```) are displayed together:
``calibration="none"`) are displayed together:
.. code-block:: python
Expand Down
4 changes: 2 additions & 2 deletions nenupy/astro/sky.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
import dask.array as da
from dask.diagnostics import ProgressBar

import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib import patheffects
from matplotlib.colorbar import ColorbarBase
from mpl_toolkits.axes_grid1.inset_locator import inset_axes
import warnings
from matplotlib.cm import get_cmap
from matplotlib.ticker import LinearLocator
from matplotlib.colors import Normalize

Expand Down Expand Up @@ -346,7 +346,7 @@ def plot(self, **kwargs):
warnings.simplefilter("ignore")
cb = ColorbarBase(
cax,
cmap=get_cmap(name=cmap),
cmap=mpl.colormaps[cmap],
orientation='vertical',
norm=Normalize(
vmin=vmin,
Expand Down
3 changes: 1 addition & 2 deletions nenupy/io/xst.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
from matplotlib.colorbar import ColorbarBase
from matplotlib.ticker import LinearLocator
from matplotlib.colors import Normalize
from matplotlib.cm import get_cmap
from mpl_toolkits.axes_grid1.inset_locator import inset_axes
import dask.array as da
from dask.diagnostics import ProgressBar
Expand Down Expand Up @@ -1792,7 +1791,7 @@ def save_png(
)
cb = ColorbarBase(
cax,
cmap=get_cmap(name=cmap),
cmap=mpl.colormaps[cmap],
orientation="vertical",
norm=Normalize(
vmin=nf_image_min,
Expand Down

0 comments on commit 12a10cd

Please sign in to comment.