[파이썬!] 파이썬으로 그래프 그리기 by yoon

View this thread on steempeak.com
· @yoon · (edited)
$9.50
[파이썬!] 파이썬으로 그래프 그리기
https://steemitimages.com/DQmW99L4W9PjZm3cibpqZx2TGMM4w2y16PHgWg9f6x5PoHA/yoon.png
​
<center> illustration by @carrotcake </center>
​
***

파이썬을 이용해 그래프를 그려보았다.
1. y=x<sup>2</sup>
2. y=sin(x)

두 그래프를 그려보자.

#### 입력
```
import numpy as np
%matplotlib inline
import matplotlib.pyplot as plt
x=np.linspace(-10,10,100)
y=x**2
plt.plot(x,y)
```

#### 결과
![20181106-141504.png](https://ipfs.busy.org/ipfs/QmfBXzqYnKU7NWSNcGaJmVjeFH6VCXhdvAy4Uq6DxRUuUM)

여기에서 조금 더 보완하면
x,y축 라벨과 그래프 제목 등을 넣을 수 있다.

###### x축 y축 라벨 넣기
```
plt.xlabel("x")
plt.ylabel("y")
```
###### 그래프 제목 넣기
```
plt.title("Y=X^2")
```

#### 사인함수
```
import numpy as np
%matplotlib inline
import matplotlib.pyplot as plt
x=np.linspace(-5,5,100)
y=np.sin(x)
plt.plot(x,y)
```
![20181106-142310.png](https://ipfs.busy.org/ipfs/QmWYwbg3TKEYX374wsnMisyKfvSPTgK9CBGCZPBFjZGqAN)
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 111 others
properties (23)
post_id65,570,503
authoryoon
permlink4fhdf6
categorykr
json_metadata{"community":"busy","app":"steemit\/0.1","format":"markdown","tags":["kr","busy","python","jjangjjangman"],"image":["https:\/\/steemitimages.com\/DQmW99L4W9PjZm3cibpqZx2TGMM4w2y16PHgWg9f6x5PoHA\/yoon.png"],"users":["carrotcake"]}
created2018-11-06 08:27:15
last_update2018-11-13 00:11:33
depth0
children10
net_rshares8,995,470,774,869
last_payout2018-11-13 08:27:15
cashout_time1969-12-31 23:59:59
total_payout_value7.444 SBD
curator_payout_value2.057 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length830
author_reputation193,989,300,832,423
root_title"[파이썬!] 파이썬으로 그래프 그리기"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (175)
@bukio ·
![jjm.jpeg](https://cdn.steemitimages.com/DQmbAjdpUAWpEcFi41aJGzaJCXTzQwerpeSLikSACWYQ8aH/jjm.jpeg)
짱짱맨 호출에 응답하여 보팅하였습니다. 

짱짱맨은 저자응원 프로그램입니다. 더 많은 저자 분들에게 더 큰 혜택을 드리고자 스파임대 스폰서를 받고 있습니다. 스폰서 참여방법과 짱짱맨 프로그램에 관해서는 [이 글](https://steemit.com/kr/@bukio/jjangjjang)을 읽어 주세요. 기업형 예비증인 북이오(@bukio)가 짱짱맨 프로그램을 운영하고 있습니다. 여러분의 증인 보팅은 큰 힘이 됩니다. [Vote for @bukio](https://steemconnect.com/sign/account_witness_vote?approve=1&witness=bukio)
properties (22)
post_id65,571,006
authorbukio
permlinkre-bukio-jjangjjangman-1541493743945
categorykr
json_metadata{"tags":["bukio","jjangjjangman"],"app":"steemer\/1.0"}
created2018-11-06 08:42:24
last_update2018-11-06 08:42:24
depth1
children0
net_rshares0
last_payout2018-11-13 08:42:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length428
author_reputation12,334,203,545,676
root_title"[파이썬!] 파이썬으로 그래프 그리기"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@swsw3073 ·
오.............................
properties (22)
post_id65,571,591
authorswsw3073
permlinkre-yoon-4fhdf6-20181106t085803362z
categorykr
json_metadata{"tags":["kr"],"app":"steemit\/0.1"}
created2018-11-06 08:58:03
last_update2018-11-06 08:58:03
depth1
children0
net_rshares0
last_payout2018-11-13 08:58:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length30
author_reputation8,424,721,547,581
root_title"[파이썬!] 파이썬으로 그래프 그리기"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@smigol ·
컴퓨터 언어는 너무 어려운 ㅠㅠ
properties (22)
post_id65,572,125
authorsmigol
permlinkre-yoon-4fhdf6-20181106t091307008z
categorykr
json_metadata{"tags":["kr"],"app":"steemit\/0.1"}
created2018-11-06 09:13:09
last_update2018-11-06 09:13:09
depth1
children0
net_rshares0
last_payout2018-11-13 09:13:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length17
author_reputation22,791,755,523,244
root_title"[파이썬!] 파이썬으로 그래프 그리기"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@blockchainstudio · (edited)
오 프로그래밍 공부하시는군요ㅎㅎ 앞으로 더 흥미진진한 포스팅이 나오겠네요.
properties (22)
post_id65,606,270
authorblockchainstudio
permlinkre-yoon-4fhdf6-20181106t220211321z
categorykr
json_metadata{"format":"markdown","community":"busy","image":[],"links":[],"users":[],"app":"busy\/2.5.6","tags":["kr"]}
created2018-11-06 22:01:33
last_update2018-11-06 22:01:48
depth1
children1
net_rshares0
last_payout2018-11-13 22:01:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length41
author_reputation187,643,417,195,608
root_title"[파이썬!] 파이썬으로 그래프 그리기"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@yoon ·
진도가 아주 느릿느릿 진행될 거 같습니다. ㅎㅎ
properties (22)
post_id65,619,332
authoryoon
permlinkre-blockchainstudio-re-yoon-4fhdf6-20181107t041026218z
categorykr
json_metadata{"tags":["kr"],"app":"steemit\/0.1"}
created2018-11-07 04:10:27
last_update2018-11-07 04:10:27
depth2
children0
net_rshares0
last_payout2018-11-14 04:10:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length26
author_reputation193,989,300,832,423
root_title"[파이썬!] 파이썬으로 그래프 그리기"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@anpigon · (edited)
개발글은 #kr-dev 태그 사용 추천합니다~
properties (22)
post_id65,612,153
authoranpigon
permlinkre-yoon-4fhdf6-20181107t003852481z
categorykr
json_metadata{"app":"steemit\/0.1","tags":["kr","kr-dev"]}
created2018-11-07 00:38:54
last_update2018-11-07 00:39:15
depth1
children2
net_rshares0
last_payout2018-11-14 00:38:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length25
author_reputation106,878,140,422,651
root_title"[파이썬!] 파이썬으로 그래프 그리기"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@yoon ·
ㅎㅎ 다음부터 달겠습니다. (사실 생각해보았으나 개발이라 하기엔 너무 미약해서 달지 않았습니다)
properties (22)
post_id65,619,310
authoryoon
permlinkre-anpigon-re-yoon-4fhdf6-20181107t040947063z
categorykr
json_metadata{"tags":["kr"],"app":"steemit\/0.1"}
created2018-11-07 04:09:48
last_update2018-11-07 04:09:48
depth2
children1
net_rshares0
last_payout2018-11-14 04:09:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length53
author_reputation193,989,300,832,423
root_title"[파이썬!] 파이썬으로 그래프 그리기"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@anpigon ·
제가 주로 보는 태그가 #kr-dev 태그라서요.ㅋㅋ 감사합니다.
properties (22)
post_id65,620,022
authoranpigon
permlinkre-yoon-re-anpigon-re-yoon-4fhdf6-20181107t043022227z
categorykr
json_metadata{"tags":["kr","kr-dev"],"app":"steemit\/0.1"}
created2018-11-07 04:30:21
last_update2018-11-07 04:30:21
depth3
children0
net_rshares0
last_payout2018-11-14 04:30:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length36
author_reputation106,878,140,422,651
root_title"[파이썬!] 파이썬으로 그래프 그리기"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@steem-ua ·
#### Hi @yoon!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your **UA** account score is currently 4.642 which ranks you at **#1614** across all Steem accounts.
Your rank has dropped 5 places in the last three days (old rank 1609).

In our last Algorithmic Curation Round, consisting of 306 contributions, your post is ranked at **#24**.
##### Evaluation of your UA score:

* Some people are already following you, keep going!
* The readers appreciate your great work!
* Good user engagement!


**Feel free to join our [@steem-ua Discord server](https://discord.gg/KpBNYGz)**
properties (22)
post_id65,628,359
authorsteem-ua
permlinkre-4fhdf6-20181107t081758z
categorykr
json_metadata{"app":"beem\/0.20.9"}
created2018-11-07 08:18:00
last_update2018-11-07 08:18:00
depth1
children0
net_rshares0
last_payout2018-11-14 08:18:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length634
author_reputation23,203,609,903,979
root_title"[파이썬!] 파이썬으로 그래프 그리기"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@gomdory ·
@yoon님 곰돌이 자다 깨서 보팅 왔어요. 그럼 전 다시 꿈나라로~  @gomdory 곰도뤼~
properties (22)
post_id65,787,882
authorgomdory
permlinkre-4fhdf6-20181110t060434
categorykr
json_metadata{}
created2018-11-10 06:04:36
last_update2018-11-10 06:04:36
depth1
children0
net_rshares0
last_payout2018-11-17 06:04:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length53
author_reputation43,207,143,526,344
root_title"[파이썬!] 파이썬으로 그래프 그리기"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000