AttributeError: AxesImage.set() got an unexpected keyword argument 'camp'
时间: 2023-10-01 15:09:26 浏览: 645
AttributeError: module 'tensorflow.compat.v1' has no attribute '
This error occurs because the keyword argument 'camp' is misspelled. The correct keyword argument is 'cmap' which stands for 'color map'.
To fix this error, replace 'camp' with 'cmap' in the code. For example:
```
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
im = ax.imshow([[1,2],[3,4]])
im.set(cmap='viridis') # replace camp with cmap
plt.show()
```
阅读全文