|
57 | 57 | "outputs": [], |
58 | 58 | "source": [ |
59 | 59 | "import librosa\n", |
| 60 | + "import matplotlib as mpl\n", |
60 | 61 | "import matplotlib.pyplot as plt\n", |
61 | 62 | "import numpy as np\n", |
62 | 63 | "import os\n", |
63 | 64 | "import pyloudnorm as pyln\n", |
64 | 65 | "import warnings\n", |
65 | | - "from matplotlib.cm import get_cmap\n", |
66 | 66 | "from matplotlib.colors import BoundaryNorm\n", |
67 | 67 | "from scipy.io import wavfile\n", |
68 | 68 | "from scipy.signal import resample, stft, welch\n", |
|
110 | 110 | "def set_cmap(xmax, dbrange):\n", |
111 | 111 | " \"\"\"cmap for STFT 20log10(|X[t,f]|) in dB.\"\"\"\n", |
112 | 112 | " col_tick = np.linspace(xmax - dbrange, xmax, dbrange, endpoint=True)\n", |
113 | | - " cmap = get_cmap(\"magma\").copy()\n", |
| 113 | + " cmap = mpl.colormaps[\"magma\"].copy()\n", |
114 | 114 | " cmap.set_over(\"C3\")\n", |
115 | 115 | " cmap.set_under(\"C7\")\n", |
116 | 116 | " norm = BoundaryNorm(col_tick, cmap.N)\n", |
|
444 | 444 | "name": "python", |
445 | 445 | "nbconvert_exporter": "python", |
446 | 446 | "pygments_lexer": "ipython3", |
447 | | - "version": "3.10.6" |
| 447 | + "version": "3.12.3" |
448 | 448 | } |
449 | 449 | }, |
450 | 450 | "nbformat": 4, |
|
0 commit comments