python notebook,,In[3]:prin
python notebook,,In[3]:prin
In[3]:print "hello world"
hello worldIn[5]:
for i in range(5): print i
01234In[12]:
import matplotlib.pyplot as pltfig = plt.figure()ax1 = fig.add_subplot(2,2,1)plt.show()In[11]:
import numpy as npimport matplotlib.pyplot as pltplt.figure(1) # 创建图表1plt.figure(2) # 创建图表2ax1 = plt.subplot(211) # 在图表2中创建子图1ax2 = plt.subplot(212) # 在图表2中创建子图2x = np.linspace(0, 3, 100)for i in xrange(5): plt.figure(1) #? # 选择图表1 plt.plot(x, np.exp(i*x/3)) plt.sca(ax1) #? # 选择图表2的子图1 plt.plot(x, np.sin(i*x)) plt.sca(ax2) # 选择图表2的子图2 plt.plot(x, np.cos(i*x))plt.show()In[]:
python notebook
相关内容
- numpy.tolist( )函数,,官方文档:https
- python yield 和 yield from用法总结,,#例1. 简单输出斐
- Python+Selenium之常用模块,,要用webdrive
- Python库win32com的下载地址,,http://sou
- Python 学习,,打印出在文件test
- Python交互图表可视化Bokeh:3. 散点图,,散点图① 基本散
- python接口自动化(三十九)- logger 日志 - 上(超详解)
- 调用百度ocr的API,python简易版本,,调用百度ocr的AP
- python实现vip视频解析爬取,,实战背景爱奇艺的VI
- python 带小数点时间格式化,,#获取带小数点的时间
评论关闭