Python怎样实现在同一张图上画两次,python张图上画,如题。Matlab中,执
Python怎样实现在同一张图上画两次,python张图上画,如题。Matlab中,执
如题。
Matlab中,执行一次plot后,用语句hold on
然后再plot,两次画图即在一张图上。
在Python中,matplotlib.pyplot或者更多程序包,怎样实现?
多次plot,在同一张图上?
matplotlib 和 Matlab 差不多,而且不需要 hold on 语句。例如
import matplotlib.pyplot as pltx = range(10)y1 = [elem*2 for elem in x]plt.plot(x, y1)y2 = [elem**2 for elem in x]plt.plot(x, y2, 'r--')plt.show()
编橙之家文章,
相关内容
- Python支持调用其它语言函数吗?例如C++代码或Java包函数
- python正则表达式中函数findall用法?,pythonfindall,1.我的
- 问BeautifulSoup获得标签描述信息python源码怎么写,,
- Python协程同步问题求助asyncio模块,pythonasyncio,在Window
- Python3.4 __init__.py中类导入问题求助,,项目的结构时li
- python2.7.6 requests模块提交中文验证码,,我的环境:win
- python websocket源码中e的作用及属性应该如何解读,pyth
- 想用python语言写个微信程序的后台需要用到什么?,py
- 请问如何让python使用1.9.0的numpy?,1.9.0numpy,OSX 10.9使用
- 求助python高手解决公钥解密时报错,求助python解密时报
评论关闭