Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/361.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sockets/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 加载回文件后,matplotlib打印中的隐藏轴可见_Python_Python 3.x_Tensorflow_Matplotlib_Tensorflow2.0 - Fatal编程技术网

Python 加载回文件后,matplotlib打印中的隐藏轴可见

Python 加载回文件后,matplotlib打印中的隐藏轴可见,python,python-3.x,tensorflow,matplotlib,tensorflow2.0,Python,Python 3.x,Tensorflow,Matplotlib,Tensorflow2.0,我使用中的代码生成股票价格的蜡烛棒图表。代码隐藏了轴,一切都很好 plt.figure() 宽度=1 宽度2=0.1 价格支持=df[df.close>=df.open] 价格下跌=df[df.close

我使用中的代码生成股票价格的蜡烛棒图表。代码隐藏了轴,一切都很好

plt.figure()
宽度=1
宽度2=0.1
价格支持=df[df.close>=df.open]
价格下跌=df[df.close
但当我使用TensorFlow decode_png方法加载图像时,它显示隐藏轴:

image=tf.io.read\u文件('test.png')
image=tf.io.decode\u png(图像)
plt.imshow(图片)
plt.show()
通过windows照片加载的图像:

使用TensorFlow库加载到Pythin中的图像:


这不是显示隐藏轴,您的图像在没有第一个轴的情况下正确保存。但是当您打开图像时,
plt.imshow()
正在创建并显示一个新轴。在
plt.imshow(图像)
之后添加行
plt.axis('off')
,它将删除此新轴。

谢谢!所以这是一个完全虚构的x-y轴?@MehdiZare没问题!我想它会计算图像中的像素,我试过了,轴与图像大小匹配