0
저는 파이썬으로 작성한 차트를 가지고 있습니다. 그래프는 다음과 같습니다easy_install으로 스플라인 패키지를 설치하십시오.
... 그리고 코드의 그래프 비트는 다음과 같습니다에 answers like this에서 논의 된 바와 같이 나는 스플라인 패키지를 사용하기 위해 노력하고있어
def graph(seconds,now, dayold, threedayold,weekold):
dis=4*24*60*60
x = np.array(seconds[-dis:])
ynow = np.array(now)
yday = np.array(dayold)
y3day = np.array(threedayold)
yweek = np.array(weekold)
plt.plot(x,ynow, 'blue')
plt.plot(x,yday, 'green')
plt.plot(x,y3day,'purple')
plt.plot(x,yweek, 'red')
# plt.fill_between(x,ynow,yday,color='lightblue')
# plt.fill_between(x,yday,y3day,color='green')
# plt.fill_between(x,y3day,yweek,color='purple')
# plt.fill_between(x,yweek,[0] *len(seconds),color='red')
currenttime=int(seconds[0])
lastweek=myround(currenttime-7*24*3600)
plt.xlim(lastweek, currenttime)
plt.ylim(ymax=100)
ticks=np.arange(lastweek,currenttime,24*3600)
labels=[time.strftime("%a", time.gmtime(x)) for x in ticks]
plt.xticks(ticks,labels)
plt.grid()
plt.savefig('/home/joereddington/joereddington.com/stress/stress.png')
a=processFile("/home/joereddington/Jurgen/tracking/results.txt")
print "file processed"
graph(a[0],a[1],a[2],a[3],a[4])
그래프를 부드럽게 만드십시오. 그러나 관련 패키지를 설치하는 데 정말 고심하고 있습니다. (dreamhost) 서버에서이 작업을 수행하므로 내 환경을 구축해야하지만 스플라인을 잡으려고 할 때 :
[email protected]:~/env$ easy_install --install-dir=~/env spline
Searching for spline
Reading http://pypi.python.org/simple/spline/
Couldn't find index page for 'spline' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for spline
error: Could not find suitable distribution for Requirement.parse('spline')
[email protected]:~/env$
내가 뭘 잘못하고 있니? 패키지를 어디에서 찾을 수 있습니까?
링크 된 대답으로 판단하면'scipy.interpolate.spline'이므로'scipy'의 일부입니다. 다른 '스플라인 (spine)'패키지를 원한다면 질문을 관련 정보로 업데이트하십시오. – Evert
예 - 그 중 하나입니다 :) – Joe