我正在尝试创建散点图。我有一个从0到17的数字列表,以及一个包含18个值的数组。我可以将数据绘制为线状图,但当我尝试绘制散点图时,我得到了一条错误消息,我不明白:TypeError: ufunc 'sqrt' not supported for the input types, and如何将数据绘制为散点图?
似乎不能让熊猫做一个散点图: TypeError: only length-1 arrays can be converted to Python scalars基本示例: y= self.df['xy']我试着做一个气泡图(带有颜色和大小的散点图),需要4个额外的参数
气泡示例sct = plt.scatter(x, y, c=clr,
详细解释了如何为pcolormesh标准化色彩贴图,但是我如何才能正确地为散点图进行标准化呢?= mcolors.Normalize(vmin=-1, vmax=1)不工作(TypeErrorCannot cast array data from dtype('O') to dtype('int64') according to the rule 'safe')
我正在尝试将XY坐标从一个列表附加到另一个列表,这样我就可以在15个不同对象的散点图周围绘制补丁。但是在尝试运行代码时,我得到了一个错误,TypeError: list indices must be integers or slices, not tuple。scatter = ax.scatter(x_data[0], y_data[0], zorder = 5, s = 2