Colormap issue using animation in matplotlib

前端 未结 1 1062
别那么骄傲
别那么骄傲 2021-01-14 21:04

I use matplotlib.animation to animate data in a 3D array named arr. I read data from a h5 file using h5py library and everything is OK

相关标签:
1条回答
  • 2021-01-14 21:48

    I think you want to replace set_clim() with

    p.autoscale()
    

    With no arguments, set_clim() is a no-op.

    That said, changing your color scale in the middle of an animations seems very misleading.

    You should also use set_data instead of set_array (according to the docs).

    0 讨论(0)
提交回复
热议问题