Python
게시글 주소: https://wwww.orbi.kr/0005239040
# -*- coding: utf-8 -*-
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
fig = plt.figure()
ax1 = fig.add_subplot(2,2,1)
ax2 = fig.add_subplot(2,2,2)
ax3 = fig.add_subplot(2,2,3)
plt.plot(np.random.randn(50).cumsum(), 'co-')
_ = ax1.hist(np.random.randn(100), bins = 20, color = 'b', alpha = 0.3)
ax2.scatter(np.arange(30), np.arange(30)+3*np.random.randn(30))
fig, axes = plt.subplots(2, 2, sharex = True, sharey = True)
for i in range(2):
for j in range(2):
axes[i, j].hist(np.random.randn(500), bins = 50)
plt.subplots_adjust(wspace = 0.5, hspace = 0)
data = np.random.randn(30).cumsum()
plt.plot(data, 'k--', label = 'Default')
plt.plot(data, 'k-', drawstyle = 'steps-post', label = 'stemps-post')
plt.legend(loc = 'best')
a = np.arange(1, 10)
print a.cumsum()
print a.cumprod()
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
ax.plot(np.random.randn(1000).cumsum())
ticks = ax.set_xticks([0, 250, 500, 750, 1000])
labels = ax.set_xticklabels(['one', 'two', 'three', 'four', 'five'],
rotation = 30,
fontsize = 'small')
ax.set_title('My plot')
ax.set_xlabel('Stages')
ax.set_ylabel('Values')
from datetime import datetime
import matplotlib.pylab as plt
fig = plt.figure()
ax = fig.add_subplot(1,1,1)
data = pd.read_csv('spx.csv', index_col = 0, parse_dates = True)
spx = data['SPX']
spx.plot(ax = ax, style = 'k--')
crisis_data = [
(datetime(2007,10,11), 'Peak of bull market'),
(datetime(2008, 3, 12), 'Bear Stearns Fails'),
(datetime(2008, 9, 15), 'Lehman Bankruptcy')
]
for date, label in crisis_data:
ax.annotate(label,
xy = (date, spx.asof(date)+50),
xytext = (date, spx.asof(date)+200),
arrowprops=dict(facecolor = 'black'),
horizontalalignment = 'left', verticalalignment = 'top')
ax.set_xlim(['1/1/2007', '1/1/2011'])
ax.set_ylim([600, 1800])
ax.set_title('Important dates in 2008-2009 financial crisis')
#뭔말인지 하나도 모르겠다 떤져야겠다
0 XDK (+0)
유익한 글을 읽었다면 작성자에게 XDK를 선물하세요.
-
강대k 물리 0
강대k 1회 물리 답지 있으신분???? 빠답도 ㄱㅊ음 제발ㅠㅜㅜ
-
12번 저능아풀이하고 22번은 틀림 나무위키에서 이차함수 접선 넓이 비율 보고 옴...
-
ㄱㅊ나요? 제가 듣는 수업에서 써서 패키지로 사버려서 이걸 안 풀 수가 없는데 좀...
-
ㅈㄱㄴ
-
안보니깐 가물가물혀
-
가족이 보고싶다
-
수능 직전에 한 번 더 풀고 가고 싶은데.. 추천 부탁드립니다
-
아좆됏다 0
감기걸린듯 속 간질간질하더니 기침 나옴
-
쓱 봤는데 너무 쉬운거같은데..
-
실모풀고 쳐맞아서 기출복귀함
-
ㅋㅋ
-
ㄹㅇ 볼 때마다 토 나옴 BDSM에서 S 담당일 듯
-
1교시국어 7:30 10:30 하프모고 구주연마의 서 이뮨 (12시까지하다가 줄임)...
-
그냥 살기기 싫어서 스스로 목숨을 끊는게 아니라 그 누구보다 삶을 긍정하고 행복하게...
-
지금까지 살면서 가장 어려웠던 고찰 중에 하나는... 2
다중우주와 끈 이론과의 상관관계였음 이걸 넘어설 수 있는 것은 거의 없다고 해도 될...
-
불탄 살가죽 뚫고 다시 태어날 일 꿈 같습니다. <<이거 주체가 누구인가요? 시...
-
수학 발상 2개 5
-
진짜 특상에 완전히 진심이셔서 배웠던 개념 복습하기는 좋은데 빡셈
-
LCK 희망은 당신입니다 GOAT
-
국어 6모 백분위 95.. 9모는 음 .. 94점인데 매체 쳐틀리고 쉬운거만 틀려서...
-
힘들다 1
진짜
-
하루에 아침 7시부터 오후 5시까지 안쉬고 국어에만 투자해야함 죽어보자
-
작년이랑 올해랑 많이 바뀌었나요? 둘다 풀어보신분 답변 부탁드립니다!
-
ㄱㄱ
-
ㅋㅋㅋ 공부 중독자도 아니고 한번 사는 인생인데 이게 뭐하는짓인지
-
써킷 안풀어봤는데 시즌 3, 4중에 하나만 고르자면 0
뭐살까요? 강대x모고랑 세트로 풀려고 합니다
-
집에간다.! 1
렛츠고고
-
김정은이 서울 가리키면서 군사 작전 사진 공개했다는데.. 그냥 돼지가 밥 달라고 좀...
-
왜 A가 해양이고 B가 대기야
-
이매진 핫백 새 책 반값택비 포함 3.0에 팔아요! 댓글 남겨주시면 쪽지 드릴게요
-
오늘도 0끼 2
방금 양갱하나 줏어먹음
-
국어는 뇌에 힘주고 공부하려면 에너지소모가 너무큼.. 2
그리고존나빨리배고파짐..
-
9모 95(화작) 92(확통) 2컷 1 2(쌍사) 10모 95(화작) 88(확통)...
-
해야할게너무많다느껴짐..
-
식후땡 ㄱㄱ혓 0
굿
-
오늘 부터 내일까지 사탐만 다시 조지려고 하거든요 다른 과목은 그냥 잠깐 스탑...
-
토끼똥 어떡함 0
배아픈데 찔끔찔끔 나옴
-
현강 주키마3호에 미친표지와 멋진 종강선물 필통 국어는 역시 216 or not
-
???: 아니 일단 대학을 가야죠... 생지가 답이다!!
-
경북대 모바일공학과 여기는 삼성 계약학과라 졸업후 무선사업부에서 근무하게됨....
-
각개전투 다음주에 하면 훈련은 끝
-
꽤 어렵게 느껴졌는데 1등급 비율이 7.4%길래…
-
이번주 안에 따라잡기 ㅆㄱㄴ? 하루에 국어 잘하면 5시간도 가능은 할듯
-
완벽한 토요일이 될것같아요~~~
-
이제 일년 다 되어가는데 걍 요즘엔 좀 무섭다 모든게 이렇게 수능 하나만 보고...
-
뱃 달고있는 사람 볼때마다 경외감 들듯
-
강k수학 살사람 0
22회 26회 28회
-
고3이고 6모 2, 9모 1, 10모 2 나왔습니다. 마더텅 모두 푼 상태고 김종익...
-
다음년도 수능 패스로 보상해라 ㅅㅂ 맨날 그딴 문자가 온다 진짜 하루에 몇개씩도...
스타같이 하자는 뜻입니다
배틀넷 ㄱㄱ
님
홈페이지 만들어서 운영하려면
코딩써야하나요?
헐 np, pandas, matplotlib 라니...
딱 아나콘다 사이즈네요. 데이터분석 책 봐야되는데 사논 책이 어렵;;;;;;;;;;;