#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2018/1/8 13:50
# @Author  : glacier
# @Site    : 
# @File    : matplotlib_demo3.py
# @Software: PyCharm Edu

import numpy as np
import matplotlib.pyplot as plt

def f(t):
    return np.exp(-t) * np.cos(2 * np.pi * t)

t1 = np.arange(0.0,5.0,0.1)
t2 = np.arange(0.0,5.0,0.02)

plt.subplot(211)
plt.plot(t1,f(t1),'bo',t2,f(t2),'k')
plt.subplot(212)
plt.plot(t2,np.cos(2 * np.pi * t2),'r--')
plt.show()




