import matplotlib.pyplot as plt #---------------단순 차트---------------plt.plot( [1,2,3,4]) plt.plot(Series x, Series y) #---------------복수 차트---------------fig = plt.figure() ax1 = fig.add_subplot(1,2,1)ax2 = fig.add_subplot(1,2,2) #---------------크기가 다른 2 차트 --------------- fig = plt.figure(figsize=(12, 8)) top_axes = plt.subplot2grid((4, 4), (0, 0), rowspan=3, colspan=4)bottom_axes = plt.subplot..
코드를 utf-8 로 설정할때는 # -*- coding: utf-8 -*- 파일을 utf-8 로 읽어야 할때는f = open("ttt.txt", "r", encoding="utf-8") 참고로 아래코드는f = open("ttt.txt", "r", "utf-8") TypeError: an integer is required (got type str) 타입에러가 나는데 Python3 로 오면서 파라미터가 변경되어 암시적으로 3번째 파라미터에 integer를 받으려 한다명시적으로 encoding 을 써주면 문제가 없다
환경windows 10 home 64 bitAnaconda 32bit 4.2.9 python 3.5간단한 출력인데도 아래와 같은 오류가 떴다TypeError: 'figure' is an unknown keyword argumentBackend Qt5Agg is interactive backend. Turning interactive mode on.anaconda3 에서는 matplotlib 에 대해서 interactive mode 가 지원되는데아래 명령을 통해서 matplotlib backend들을 조회할 수 있다 python -c “import matplotlib; print(matplotlib.rcsetup.all_backends)” 'GTK', 'GTKAgg', ........'MacOSX', ..
slice는 start:stop[:step]의 형식으로 쓸 수있습니다. 여기서 [:step]은 써도 되고 안써도 된다는 의미입니다.step을 명시하지 않을 경우에는a[start:end] # start부터 end-1까지의 itema[start:] # start부터 리스트 끝까지 itema[:end] # 처음부터 end-1까지의 itema[:] # 리스트의 모든 itemstep value를 쓰는 경우에는a[start:end:step]# start부터 end-1까지 step만큼 인덱스 증가시키면서step을 지정할 때 :end에 유의하세요 end는 end부터 포함시키지 않겠다는 의미이지 end가 꼭 포함된다는 의미는 아닙니다.또 start나 end가 음수가 음수인 경우에는 리스트의 끝에서부터 카운트하겠다는 의미..
1. MongoDB Pulbic GPG Key 등록 $ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 2.MongoDB 를 위한 list file 생성 (자신의 Ubuntu 버전에 맞게 입력)# Ubuntu 12.04$ echo "deb http://repo.mongodb.org/apt/ubuntu precise/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list # Ubuntu 14.04$ echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multi..
영문 홈 보고 작성했는데 쓰고나니 번역을 잘하신 분이 계셔서 일단 링크http://egloos.zum.com/mataeoh/v/7052271 -----------------------------------------------------------------python = Cpython anaconda = python + 195 packages anaconda 다운로드https://www.continuum.io/downloads package reference (=conda cheatsheet)http://conda.pydata.org/docs/_downloads/conda-cheatsheet.pdf ----------------------------------------------------------..