python如何让绘图界面停留_如何从matplotlib循环绘图图形而不必关闭窗口?

我试着从一个列表(y轴)中连续地绘制数据点与列表的长度(“my_list”)。我很困惑matplotlib是否有可能不必每次都关闭图形窗口就可以连续地绘制图形?同时,是否有可能将变量“平均值”与变量“len(my_list)”对应起来。在

这是我的代码:from tweepy.streaming import StreamListener

from tweepy import OAuthHandler

from tweepy import Stream

import json

from textblob import TextBlob

import matplotlib.pyplot as plt

# Variables that contains the user credentials to access Twitter API

access_token = ""

access_token_secret = ""

consumer_key = ""

consumer_secret = ""

# This is a basic listener that just prints received tweets to stdout.

my_list = [] #creates empty list

class StdOutListener(StreamListener):

def on_data(self, data):

json_load = json.loads(data)

texts = json_load['text'] # string

#coded = texts.encode(

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值