Spyder 4没有显示图,而是显示类似“取消选中“静音内联图""的消息.在“绘图"窗格的“选项"菜单下." [英] Spyder 4 is not displaying plots and displays message like this 'uncheck "Mute Inline Plotting" under the Plots pane options menu.'

查看:1202
本文介绍了Spyder 4没有显示图,而是显示类似“取消选中“静音内联图""的消息.在“绘图"窗格的“选项"菜单下."的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了这段代码.它应该以spyder ide显示绘图.

I wrote this code. It should display the plots in spyder ide.

import pandas as pd
import numpy as np 
import matplotlib.pyplot as plt
from IPython.display import display
from sklearn.ensemble import RandomForestRegressor
from sklearn.metrics import mean_absolute_error
import scipy.signal
import scipy.stats
from sklearn.model_selection import train_test_split


train = pd.read_csv("train.csv", nrows=9000000,dtype={'acoustic_data':np.int16,'time_to_failure':np.float64})

train.rename({"acoustic_data": "signal", "time_to_failure": "quaketime"}, axis="columns", inplace=True)      

#visualization(train,title="Acoustic data and time to failure: sampled data")
fig, ax = plt.subplots(2,1, figsize=(20,12))
ax[0].plot(train.index.values, train.quaketime.values, c="darkred")
ax[0].set_title("Quaketime of 10 Mio rows")
ax[0].set_xlabel("Index")
ax[0].set_ylabel("Quaketime in ms")
ax[1].plot(train.index.values, train.signal.values, c="mediumseagreen")
ax[1].set_title("Signal of 10 Mio rows")
ax[1].set_xlabel("Index")
ax[1].set_ylabel("Acoustic Signal")

Spyder IDE会显示以下消息,而不是情节

Spyder IDE dispaly following message instead of plot

现在默认情况下,图形"窗格中将渲染图形.为了使他们也 在控制台中内联显示时,请取消选中 绘图"窗格的选项菜单.

Figures now render in the Plots pane by default. To make them also appear inline in the Console, uncheck "Mute Inline Plotting" under the Plots pane options menu.

我已经在Google colab中测试了此代码.它绘制所需的图.我如何在Spyder IDE中进行绘图. 我正在使用Spyder 4.0.1.我没有找到任何取消内联绘图"选项以取消选中

I have tested this code in google colab. It plots the required graph. How I can plot in Spyder IDE. I am using Spyder 4.0.1. I did not found any "Mute Inline Plotting" option to uncheck

推荐答案

您所拥有的既不是错误也不是警告.这是一条指令.您可以找到以下选项:

What you have is neither an error nor a warning. It's an instruction. You can find the options following:

忽略控制台输出,只是为了让您了解Spyder 4.0.1.

Ignore the console outputs, that's just to give you orientation in Spyder 4.0.1.

这篇关于Spyder 4没有显示图,而是显示类似“取消选中“静音内联图""的消息.在“绘图"窗格的“选项"菜单下."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆