일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
- html
- discrete_scatter
- KNeighborsClassifier
- pycharm
- java역사
- C언어
- vscode
- paragraph
- CES 2O21 참여
- 결합전문기관
- tensorflow
- 웹 용어
- classification
- broscoding
- web
- web 용어
- web 사진
- web 개발
- postorder
- 재귀함수
- CES 2O21 참가
- mglearn
- 머신러닝
- bccard
- 자료구조
- inorder
- 데이터전문기관
- cudnn
- Keras
- 대이터
- Today
- Total
목록[IT]/python.matplotlib (18)
bro's coding
import FinanceDataReader as fdr import matplotlib import matplotlib.pyplot as plt import numpy as np import pandas as pd import matplotlib.dates as mdates import matplotlib.ticker as mticker from matplotlib import style from matplotlib import font_manager, rc from matplotlib import gridspec import csv from mpl_finance import candlestick_ohlc from datetime import date font_name=font_manager.FontP..
import numpy as np import matplotlib.pyplot as plt from matplotlib.lines import Line2D import matplotlib.animation as animation class SubplotAnimation(animation.TimedAnimation): def __init__(self): fig = plt.figure() ax1 = fig.add_subplot(1, 2, 1) ax2 = fig.add_subplot(2, 2, 2) ax3 = fig.add_subplot(2, 2, 4) self.t = np.linspace(0, 80, 400) self.x = np.cos(2 * np.pi * self.t / 10.) self.y = np.s..
import numpy as np import matplotlib.pyplot as plt from matplotlib import animation fig, ax=plt.subplots() ax.set_xlim((0,2)) ax.set_ylim((-2,2)) ax.grid(True) line,=ax.plot([],[],lw=2) def init(): line.set_data(([],[])) return (line,) def animate(t): x=np.linspace(0,2,1000) y=np.sin(2*np.pi*(x-0.01*t)) line.set_data(x,y) return (line,) ani=animation.FuncAnimation(fig=fig,func=animate,init_func=..
dist_table=np.array([[(((data[i]-data[j])**2).sum())**0.5 for j in range(150)]for i in range(150)]) array([[0. , 0.53851648, 0.50990195, ..., 4.45982062, 4.65080638, 4.14004831], [0.53851648, 0. , 0.3 , ..., 4.49888875, 4.71805044, 4.15331193], [0.50990195, 0.3 , 0. , ..., 4.66154481, 4.84871117, 4.29883705], ..., [4.45982062, 4.49888875, 4.66154481, ..., 0. , 0.6164414 , 0.64031242], [4.6508063..
# 가볍게 복붙 from matplotlib import font_manager, rc font_name=font_manager.FontProperties(fname="C:/Windows/Fonts/HMFMPYUN.TTF").get_name() # fname="C:/Windows/Fonts/HMFMPYUN.TTF" 원하는 font 찾아서 바꿈 rc('font',family=font_name)
plt.plot(range(5),range(10,20,2)) import numpy as np import matplotlib.pyplot as plt plt.plot(range(5),range(10,20,2)) plt.axis('equal')
plt.savefig('myplot.jpg',dpi=10000)
import numpy as np import matplotlib.pyplot as plt plt.axis([-10,10,-10,10]) plt.vlines([0,5,-5],-10,10,linestyles=':') # 수직으로 점(0,5,-5)에 -10에서 10까지 그려라 plt.hlines([0,5,-5],-10,10,linestyles=':') # ([그리는 좌표],길이,선 스타일) plt.text(0,0,'hello',fontsize=20,va='top',ha='right') # 글 쓰기 # 화살표 plt.annotate('zero',xy=(0,0),xytext=(5,5),arrowprops=dict(facecolor='black')) # (문자,xy=화살표 방향, xytext=문자,화살표 위치,a..
import numpy as np import matplotlib.pyplot as plt plt.subplot(2,2,1) plt.plot([1,2,3,4]) plt.subplot(2,2,2) plt.scatter(np.random.randn(100),np.random.randn(100)) plt.subplot(2,2,3) plt.bar(range(10),range(10)) plt.subplot(2,2,4) plt.imshow(np.random.randn(64,64)) matplotlib.subplot(그래프 여러개 그리기 1) axes[0,0].plot([1,2,3,4]) import numpy as np import matplotlib.pyplot as plt axes[0,0].plot([1,2,3..
axes[0,0].plot([1,2,3,4]) import numpy as np import matplotlib.pyplot as plt axes[0,0].plot([1,2,3,4]) axes[0,1].scatter(np.random.randn(100),np.random.randn(100)) axes[1,0].bar(range(10),range(10)) axes[1,1].imshow(np.random.randn(64,64)) fig.suptitle('Test',fontsize=20) axes[0,0].set_title('Test1') matplotlib.subplot(그래프 여러개 그리기 2) import numpy as np import matplotlib.pyplot as plt plt.subplot..