比如我有如下绘制点的代码:
ax.scatter([31], input_data_labels_plot.numpy(), color='green', label='True Label', zorder=2)
ax.scatter([31], best_pred_plot.numpy(), color='red', label='Predicted Label', zorder=2)
你可以通过在 scatter 方法中添加 s 参数来控制点的大小。s 参数表示点的面积,数值越大点越大。
修改为:
ax.scatter([31], input_data_labels_plot.numpy(), color='green', label='True Label', zorder=2, s=100)
ax.scatter([31], best_pred_plot.numpy(), color='red', label='Predicted Label', zorder=2, s=100)
在这段代码中,s=100 设置了散点的大小,你可以根据需要调整这个值来控制点的大小。
181

被折叠的 条评论
为什么被折叠?



