Programming/Python

파이썬 스케일이 다른 그래프

쌍쌍바나나 2017. 11. 2. 21:17
반응형

파이썬 스케일이 다른 두개의 값 그리기

코드

import matplotlib.pyplot as plt
fig, ax1 = plt.subplots()
ax1.plot(df["..."])
# ...
ax2 = ax1.twinx()
ax2.plot(df["Market"])
ax2.set_ylim([0, 5])
# http://matplotlib.org/examples/api/two_scales.html
view raw two_scales.py hosted with ❤ by GitHub
반응형