create account

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

View this thread on: hive.blogpeakd.comecency.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)
authoryoon
permlink4fhdf6
categorykr
json_metadata{"community":"busy","app":"steemit/0.1","format":"markdown","tags":["kr","busy","python","jjangjjangman"],"users":["carrotcake"],"image":["https://steemitimages.com/DQmW99L4W9PjZm3cibpqZx2TGMM4w2y16PHgWg9f6x5PoHA/yoon.png","https://ipfs.busy.org/ipfs/QmfBXzqYnKU7NWSNcGaJmVjeFH6VCXhdvAy4Uq6DxRUuUM","https://ipfs.busy.org/ipfs/QmWYwbg3TKEYX374wsnMisyKfvSPTgK9CBGCZPBFjZGqAN"]}
created2018-11-06 08:27:15
last_update2018-11-13 00:11:33
depth0
children10
last_payout2018-11-13 08:27:15
cashout_time1969-12-31 23:59:59
total_payout_value7.444 HBD
curator_payout_value2.057 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length830
author_reputation173,293,211,289,240
root_title"[파이썬!] 파이썬으로 그래프 그리기"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id74,773,509
net_rshares8,995,470,774,869
author_curate_reward""
vote details (175)
@anpigon · (edited)
개발글은 #kr-dev 태그 사용 추천합니다~
properties (22)
authoranpigon
permlinkre-yoon-4fhdf6-20181107t003852481z
categorykr
json_metadata{"tags":["kr","kr-dev"],"app":"steemit/0.1"}
created2018-11-07 00:38:54
last_update2018-11-07 00:39:15
depth1
children2
last_payout2018-11-14 00:38:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length25
author_reputation17,258,940,000,931
root_title"[파이썬!] 파이썬으로 그래프 그리기"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id74,820,198
net_rshares0
@yoon ·
ㅎㅎ 다음부터 달겠습니다. (사실 생각해보았으나 개발이라 하기엔 너무 미약해서 달지 않았습니다)
properties (22)
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
last_payout2018-11-14 04:09:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length53
author_reputation173,293,211,289,240
root_title"[파이썬!] 파이썬으로 그래프 그리기"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id74,828,189
net_rshares0
@anpigon ·
제가 주로 보는 태그가 #kr-dev 태그라서요.ㅋㅋ 감사합니다.
properties (22)
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
last_payout2018-11-14 04:30:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length36
author_reputation17,258,940,000,931
root_title"[파이썬!] 파이썬으로 그래프 그리기"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id74,828,997
net_rshares0
@blockchainstudio · (edited)
오 프로그래밍 공부하시는군요ㅎㅎ 앞으로 더 흥미진진한 포스팅이 나오겠네요.
properties (22)
authorblockchainstudio
permlinkre-yoon-4fhdf6-20181106t220211321z
categorykr
json_metadata{"community":"busy","app":"busy/2.5.6","format":"markdown","tags":["kr"],"users":[],"links":[],"image":[]}
created2018-11-06 22:01:33
last_update2018-11-06 22:01:48
depth1
children1
last_payout2018-11-13 22:01:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length41
author_reputation178,988,499,015,921
root_title"[파이썬!] 파이썬으로 그래프 그리기"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id74,813,576
net_rshares0
@yoon ·
진도가 아주 느릿느릿 진행될 거 같습니다. ㅎㅎ
properties (22)
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
last_payout2018-11-14 04:10:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length26
author_reputation173,293,211,289,240
root_title"[파이썬!] 파이썬으로 그래프 그리기"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id74,828,212
net_rshares0
@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)
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
last_payout2018-11-13 08:42:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length428
author_reputation11,545,563,591,097
root_title"[파이썬!] 파이썬으로 그래프 그리기"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id74,774,065
net_rshares0
@gomdory ·
@yoon님 곰돌이 자다 깨서 보팅 왔어요. 그럼 전 다시 꿈나라로~  @gomdory 곰도뤼~
properties (22)
authorgomdory
permlinkre-4fhdf6-20181110t060434
categorykr
json_metadata""
created2018-11-10 06:04:36
last_update2018-11-10 06:04:36
depth1
children0
last_payout2018-11-17 06:04:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length53
author_reputation38,104,394,235,725
root_title"[파이썬!] 파이썬으로 그래프 그리기"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id75,016,273
net_rshares0
@smigol ·
컴퓨터 언어는 너무 어려운 ㅠㅠ
properties (22)
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
last_payout2018-11-13 09:13:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length17
author_reputation22,802,589,980,779
root_title"[파이썬!] 파이썬으로 그래프 그리기"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id74,775,320
net_rshares0
@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)
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
last_payout2018-11-14 08:18:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length634
author_reputation23,214,230,978,060
root_title"[파이썬!] 파이썬으로 그래프 그리기"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id74,838,238
net_rshares0
@swsw3073 ·
오.............................
properties (22)
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
last_payout2018-11-13 08:58:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length30
author_reputation8,429,066,524,463
root_title"[파이썬!] 파이썬으로 그래프 그리기"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id74,774,729
net_rshares0