matplotlib-python drawing-conversion-tested

巴扎黑
Release: 2016-12-07 09:25:55
Original
1546 people have browsed it

import numpy as np 
import matplotlib.pyplot as plt 
plt.figure(1) 
plt.figure(2) 
ax1 = plt.subplot(211) 
ax2 = plt.subplot(212) 
x = np.linspace(0, 3, 100) 
for i in xrange(5): 
    plt.figure(1)  
    plt.plot(x, np.exp(i*x/3)) 
    plt.sca(ax1)   
    plt.plot(x, np.sin(i*x)) 
    plt.sca(ax2)  
    plt.plot(x, np.cos(i*x)) 
plt.show() 

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!