【问题标题】:Spyder 4 is not displaying plots and displays message like this 'uncheck "Mute Inline Plotting" under the Plots pane options menu.'Spyder 4 不显示绘图并显示类似“在绘图窗格选项菜单下取消选中“静音内联绘图”的消息。
【发布时间】:2020-05-03 06:53:37
【问题描述】:

我写了这段代码。它应该在 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 显示以下消息而不是绘图

图形现在默认呈现在“绘图”窗格中。让他们也 出现在控制台中,取消选中“Mute Inline Plotting”下 绘图窗格选项菜单。

我已经在 google colab 中测试了这段代码。它绘制所需的图表。我如何在 Spyder IDE 中绘图。 我正在使用 Spyder 4.0.1。我没有找到任何“静音内联绘图”选项来取消选中

【问题讨论】:

  • 完全按照它告诉你的内容进行
  • 我在 spyder ide 中没有找到“静音内联绘图”选项
  • 还应该验证“绘图”窗格是否可见。转到 View -> Panes 并检查“Plots”案例。

标签: python matplotlib anaconda ipython spyder


【解决方案1】:

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

忽略控制台输出,这只是为了在 Spyder 4.0.1 中为您提供指导。

【讨论】:

  • 如果不是警告,为什么会显示一个橙色的大横幅,上面写着“警告”? (我使用的是 Spyder 5.0.5。)
  • @Ilya 不知道。也许是因为我的回答是关于 Spyder 4
猜你喜欢
  • 1970-01-01
  • 2023-03-23
  • 2016-10-30
  • 1970-01-01
  • 2014-07-23
  • 1970-01-01
  • 2016-05-19
  • 2017-07-28
  • 1970-01-01
相关资源
最近更新 更多