我有类似的数据格式
f = [
((0, 2), 519.52876712328771),
((0, 3), 514.56307692307701),
((0, 4), 564.86538461538464),
((1, 1), 641.70774647887322),
((1, 2), 537.97177419354841),
((1, 3), 529.85214285714301),
((1, 4), 467.36338028169018)
]
我想画一个棋盘格颜色的图框1单位大小。位置或(x,y)
坐标将由f[i][0]
给出,颜色将由f[i][1]
给出。正如你所看到的棋盘格不会填满整个图像。在
在python中如何使用matplotlib实现这一点?在
示例:
输出:
用我们自己的颜色。希望这有帮助!在
相关问题 更多 >
编程相关推荐