분류 전체보기

    [Matplotlib] pie 그래프와 예제 plt.pie()

    [Matplotlib] pie 그래프와 예제 plt.pie()

    Logout Menu Kernel File New NotebookDropdown Open... Make a Copy... Save as... Rename... Save and Checkpoint Revert to CheckpointDropdown Print Preview Download asDropdown AsciiDoc (.asciidoc) HTML (.html) LaTeX (.tex) Markdown (.md) Notebook (.ipynb) PDF via LaTeX (.pdf) reST (.rst) Script () Reveal.js slides (.slides.html) PDF via HTML (.pdf) Deploy as Trust Notebook Close and Halt Edit Cut Ce..

    [Matplotlib] Scatter 그래프와 예제 plt.scatter

    [Matplotlib] Scatter 그래프와 예제 plt.scatter

    Logout Menu Kernel File New NotebookDropdown Open... Make a Copy... Save as... Rename... Save and Checkpoint Revert to CheckpointDropdown Print Preview Download asDropdown AsciiDoc (.asciidoc) HTML (.html) LaTeX (.tex) Markdown (.md) Notebook (.ipynb) PDF via LaTeX (.pdf) reST (.rst) Script () Reveal.js slides (.slides.html) PDF via HTML (.pdf) Deploy as Trust Notebook Close and Halt Edit Cut Ce..

    [Matplotlib] Bar 그래프와 예제 plt.bar()

    [Matplotlib] Bar 그래프와 예제 plt.bar()

    matplotlib¶ matplotlib.pyplot 라이브러리 import In [1]: import matplotlib.pyplot as plt Bar¶ show how some quantity varies In [10]: plt.bar([1,3,0,10], [10,23,30,1]) plt.show() width¶ default = 0.8 (기본 0.8로 설정되어 있음) In [11]: plt.bar([1,2,3,4,5],[10,20,30,40,50], width=0.1) plt.show() Bar의 위치 변경¶ In [12]: def make_chart_simple_bar_chart(): movies = ["Annie Hall", "Ben-hur", "Casablanca", "Gandhi"] num..

    [Matplotlib] Plot (line) 그래프 / plt.plot(), plt.axis(), plt.title(), plt.xlabel(), plt.ylabel(), plt.legend(), plt.xticks(), plt.yticks()

    [Matplotlib] Plot (line) 그래프 / plt.plot(), plt.axis(), plt.title(), plt.xlabel(), plt.ylabel(), plt.legend(), plt.xticks(), plt.yticks()

    matplotlib¶ matplotlib.pyplot 라이브러리 import In [1]: import matplotlib.pyplot as plt plot¶plt.plot()¶ 기본 그래프 그리기 In [2]: plt.plot([1,2,10], [10,20,5])#x,y 값 (1,10) (2,20) (10, 5) plt.show() In [3]: plt.plot(['a', 'b', 'c'], [10, 29 ,5]) plt.show Out[3]: axis()¶ 축의 범위 지정 In [4]: plt.axis([-0.5, 2.2, 0, 21]) #[xmin, xmax, ymin, ymax] plt.plot(['z', 'b', 'a..

    [Python_numpy] element wise, universal function 이란?

    [Python_numpy] element wise, universal function 이란?

    element wise 란 원소와 원소 단위로 연산이 이루어진다는 뜻 universal function in python element wise 와 같은 의미 이다. 파이썬에서 element wise 와 universal function 개념이 나온다면, 이는 거의 numpy 에서 ndarray 의 연산에서 쓰일 것이다. (ndarray 의 연산은 원소와 원소 단위로 이루어진다.)

    [Python] Trailing comma, Terminal comma 란?

    [Python] Trailing comma, Terminal comma 란?

    Trailing comma 파이썬의 튜플에서만 요소의 끝에 comma 를 붙이는 것을 허용하고 있다. numpy 에서 ndarray 의 shape 을 나타낼 때, 주로 적용된다. (1,2) == (1,2,) #True

    [Git] 협업 시, git push 오류 해결 {merge conflict}

    [Git] 협업 시, git push 오류 해결 {merge conflict}

    협업시 git push 오류 error: failed to mpush some refs to 'http://github.com/~~~' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usaully caused by another repsitory pushing hint: to the same ref. You may want to first integrate the remote changes . . . 협업 시에 리모트 레포지토리에 누군가가 git push 해놓은 상태에서 나의 레포지토리의 수정사항을 git push한다면, 아래와 같이 오류가 난다. 이를 해결하기 위..

    [Git] origin 이란?

    [Git] origin 이란?

    origin git remote add origin 깃헙의 주소 remote 는 리모트 레포지토리에 관한 작업을 할 때 쓰는 명령어다. add 는 새로운 리모트 레포지토리를 등록하겠다는 뜻이다. origin 는 origin이라는 이름으로 깃헙의 주소에 있는 리모트 레포지토리를 등록하겠다는 뜻이다. 관례에 따라 레포지토리를 만드는 '근원' 이라는 뜻의 origin을 주로 사용한다. git push -u origin [브랜치이름] 현재 로컬 레포지토리에 있는 master 브랜치의 내용(=master 브랜치와 관계된 모든 커밋들)을 origin이라는 리모트 레포지토리로 보낸다 라는 뜻이다. 옵션 -u는 --set-upstream이라는 옵션의 약자이다. 로컬 레포지토리에 있는 master 브랜치가 origin에..

    [Git] git branch 란

    [Git] git branch 란

    branch on branch master 마스터 브랜치 위에 있다 레포지토리를 만들고 커밋을 하면 자동으로 생기는 브랜치 작업을 여러가지로 나누어서 한다. 무료 버전, 유료 버전, 실제 배포용 버전, 개발용 버전, 테스트용 등등의 여러 버전들을 나누어서 관리할 수 있다. git branch [브랜치이름] 새로운 브랜치 생성 git checkout [브랜치이름] [브랜치이름]으로 브랜치 이동 git branch 모든 브랜치 조회 git branch -d [브랜치이름] 브랜치 제거 git checkout -b test [브랜치이름] 브랜치를 생성하고 그 브랜치로 이동 git merge [브랜치1] [브랜치2] 브랜치1 와 브랜치2 를 병합 conflict 가 발생한 파일을 연다. 머지의 결과가 되었으면 하..

    [Git] Head 란, git reset {--hard, --soft, --mixed}, git tag

    [Git] Head 란, git reset {--hard, --soft, --mixed}, git tag

    Head 가장 최근에 한 커밋을 가리킴 매번 더 새로운 커밋을 가리킴 Head 가 가리키는 커밋에 따라 working directory 가 구성 git reset head 가 가리키는 커밋을 옮기며, 버전을 옮겨다니는 용도 git reset --hard [커밋 아이디] 복구가 불가능 하기 때문에 잘 사용하진 않는다 Head가 과거의 특정 커밋을 가리키도록 한다. staging area를 과거의 특정 커밋의 내용과 똑같게 만든다. working directory를 과거의 특정 커밋의 내용과 똑같게 만든다. git reset --soft [커밋아이디] Head가 과거의 특정 커밋을 가리키도록 한다. staging area 와 working directory 는 변화 없음 git reset --mixed [커..