作者:手机用户2502881923 | 来源:互联网 | 2023-05-19 16:14
Itriedtogoogle,butcouldntfindanyanswer.IhaveanumpyndarraywithvaluesIwanttoplota
I tried to google, but couldn't find any answer. I have a numpy ndarray with values I want to plot as a plain (no axes and stuff) heatmap where every rectangle is colored by given value.
我试着谷歌,但找不到任何答案。我有一个numpy ndarray,其值我想绘制为普通(无轴和东西)热图,其中每个矩形都按给定值着色。
I want to have it so that the height of one cell is 1px and the width is 5px.
我想拥有它,以便一个单元格的高度为1px,宽度为5px。
The final result is a png.
最后的结果是png。
Is there a way in python to plot this with those cell size parameters?
有没有一种方法在python中用这些单元格大小参数绘制它?
I tried PIL with given total width and height, but the image doesn't look clear.
我尝试了给定总宽度和高度的PIL,但图像看起来并不清晰。
All the best, L.
一切都很好,L。
1 个解决方案