小编hfa*_*ran的帖子

PyCharm中有多个类似光标的功能吗?

我喜欢Sublime Text中的多个游标,并且想知道在PyCharm中是否有类似的东西.除了Extract Variable之外,我还没有找到类似的东西,但我绝对不是一回事.

我希望能够按下Ctrl-D(显然不是那种特定的组合)并且能够突出显示后续出现以便快速修改.

python editor pycharm sublimetext2

11
推荐指数
1
解决办法
4932
查看次数

动态更新matplotlib中的条形图

我的Raspberry Pi附带了许多传感器; 我使用TCP每秒两次将数据发送到我的PC.我想使用matplotlib连续绘制这些值.

我目前使用的方法似乎效率低下(我正在清理子图并每次重绘它)并且有一些不良缺点(每次都会重新调整比例;我希望它保持在0.0 - 5.0之间).我知道有一种方法可以做到这一点,而不必清除和重绘,但似乎无法搞清楚.以下是我目前的代码:

import socket
import sys
import time
from matplotlib import pyplot as plt

# Create a TCP/IP socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

# Connect the socket to the port where the server is listening
server_address = ('192.168.0.10', 10000)
print >>sys.stderr, 'connecting to %s port %s' % server_address
sock.connect(server_address)

# Initial setup for the bar plot
plt.ion()
fig = plt.figure()
ax = fig.add_subplot(1,1,1)
x = [1,2,3]
labels = ['FSR', 'Tilt', 'IR']
ax.set_xticklabels(labels)
y = [5.0,5.0,5.0]
ax.bar(x,y) …
Run Code Online (Sandbox Code Playgroud)

python matplotlib

10
推荐指数
1
解决办法
2万
查看次数

"print >>"语法的解释

print >>sys.stderr, 'waiting for a connection'
Run Code Online (Sandbox Code Playgroud)

在这种情况下,任何人都可以解释">>"运营商的行为吗?

python python-2.x

1
推荐指数
1
解决办法
70
查看次数

标签 统计

python ×3

editor ×1

matplotlib ×1

pycharm ×1

python-2.x ×1

sublimetext2 ×1