一、 Matplotlib——Figure 的使用

import pandas as pd
import  numpy as np
import  matplotlib.pyplot as plt
print("************plot**************")
x = np.linspace(-1, 1, 50)
y = 2 * x + 1
y1 = x ** 2
# plt.plot(x, y1)
# plt.show()
print("************figure**************")
print("========两张figure 中画出不同的图像========")
x3 = np.linspace(-3, 3, 50)
y3 = 2 * x + 1
y4 = x ** 2

# plt.figure()
# plt.plot(x3, y3)
#
# plt.figure(num=3, figsize=(8, 5))
# plt.plot(x3, y4)
# plt.show()
print("========一张figure 中画出不同的图像========")
x5 = np.linspace(-3, 3, 50)
y5 = 2 * x + 1
y6 = x ** 2

plt.figure()
plt.figure(num=3, figsize=(8, 5))
plt.plot(x5, y5, color='red', linewidth=2.0, linestyle='--')
plt.plot(x5, y6)
plt.show()

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值