在下面的示例数据框中,我希望有两个y轴段(在y轴上断开),以便在“lna1”中可视化更小的值时获得更好的分辨率。我已经尝试过facet_wrap,但我想使用facet_grid来比较具有相同y尺度的基因。
# -*- coding: utf-8 -*-
import urllib
import urllib2
import cookielib
import time
def login():
username = "username"
password = "password"
cj = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
login_data = urllib.urlencode({'login_username' : username, 'login_password' : password})
opener.open('lol.com/login', login_data)
resp = opener.open('lol.com/login')
data = resp.read()
print data
write_data(data)
def write_data(data):
file = open("htmlString", "w")
file.write(data)
file.close()
monitor(data)
def monitor(data):
string1 = open("htmlString", "r").read()
string2 = data
while True:
time.sleep(5)
login()
if string1 == string2:
print "Nothing has changed"
else:
print "Something has changed"
login()