-2

This is a very weird question. I am using plt.imshow() to read spectrograms and I need to make a graph like this color style. The background is blue-ish.

enter image description here

But now I'm getting this

enter image description here

Can anyone recommend some parameters?

sealpuppy
  • 615
  • 4
  • 12
  • 27
  • The example seems to be the `jet` colormap, which is [highly discouraged](https://jakevdp.github.io/blog/2014/10/16/how-bad-is-your-colormap/) for this kind for visualizations. For standard matplotlib, the ['Perceptually Uniform Sequential'](https://matplotlib.org/3.1.0/tutorials/colors/colormaps.html) such as 'viridis', 'plasma', 'inferno', 'magma', 'cividis' are encouraged. 'Viridis' is the default, and what you got. Probably plasma is close to your needs. – JohanC Mar 15 '20 at 22:15
  • Thanks a lot for your advice. I tried the map you recommended and switched the original to 'plasma'. – sealpuppy Mar 15 '20 at 22:46

1 Answers1

-1

Just add this line plt.style.use("classic").

sealpuppy
  • 615
  • 4
  • 12
  • 27