matplotlib.pyplot 이용하여 그래프 꾸미기 [2018.09.12]
fig = matplotlib.pyplot.figure(1) #figure 1번 생성.
ax = fig.add_subplot(3, 2, 1) #3행 2열짜리 배열 중 1번째 자리에 ax이라는 subplot을 fig에 생성.
ax.plot(x, y) #x array, y array 그래프 그리기.
ax.ticklabel_format(style = 'sci', scilimits = (-3, 5), axis='both', useMathText = True) #'sci'entific notation, 10^(-3)~10^5 이외 구역 적용
ax.tick_params(direction='in') #ticklabel 그래프 안쪽으로 넣기. (기본은 바깥쪽.)
'Mathematica&Python' 카테고리의 다른 글
dict 형식 이용하여 변수명 자동 설정하기. [2018.09.13] (0) | 2018.09.13 |
---|---|
pandas 이용하여 python에서 excel file의 data 다루기. [2018.09.12] (0) | 2018.09.12 |
[2017.04.14] python 3.x버전에서 pip 사용법 (0) | 2017.04.14 |
[2017.04.14] linux mint 17.3에서 python3.5를 기본으로 바꾸기 (0) | 2017.04.14 |
[2017.04.10] Vpython 설치 (windows10) (0) | 2017.04.07 |