()
| 675 | |
| 676 | |
| 677 | def PyplotFormatstr(): |
| 678 | |
| 679 | def f(t): |
| 680 | return np.exp(-t) * np.cos(2*np.pi*t) |
| 681 | |
| 682 | t1 = np.arange(0.0, 5.0, 0.1) |
| 683 | t2 = np.arange(0.0, 5.0, 0.02) |
| 684 | |
| 685 | plt.figure(1) |
| 686 | plt.subplot(211) |
| 687 | plt.plot(t1, f(t1), 'bo', t2, f(t2), 'k') |
| 688 | |
| 689 | plt.subplot(212) |
| 690 | plt.plot(t2, np.cos(2*np.pi*t2), 'r--') |
| 691 | fig = plt.gcf() # get the figure to show |
| 692 | return fig |
| 693 | |
| 694 | |
| 695 | def UnicodeMinus(): |