霍兰德人格分析雷达图生成报错ValueError:he number of FixedLoca和AttributeError: 'Text' object has no property 'frac'
报错为:ValueError: The number of FixedLocator locations (7), usually from a call to set_ticks, does not match the number of ticklabels (6).
则只需删除红色矩形框1中的内容
如果报错为:AttributeError: ‘Text’ object has no property ‘frac’
则只需要删除红色矩形框2中的内容
修改后的完整代码如下:
#DrawHollandRadar.py
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
matplotlib.rcParams['font.family']='SimHei'
matplotlib.rcParams['font.sans-serif']=['SimHei']
radar_labels = np.array(['研究型(I)','艺术型(A)','社会型(S)',\
'企业型(E)','常规型(C)&