Python 绘制 折线图,直线度,雷达图

这篇博客主要介绍了如何使用Python进行图形绘制,包括子图的创建、散点图的绘制、折线图的表示,以及雷达图的制作。通过`matplotlib`库,展示了如何设置刻度、标签、网格,并提供了具体代码示例。
摘要由CSDN通过智能技术生成

图形绘制 plt.subplot

from matplotlib import pyplot as plt
import numpy as np
font={‘family’:‘SimHei’,‘weight’:‘Blod’,‘size’:‘14’}


plt.figure??
#def figure(num=None, # autoincrement if None, else integer from 1-N figsize=None, # defaults to rc figure.figsize dpi=None, # defaults to rc figure.dpi facecolor=None, # defaults to rc figure.facecolor edgecolor=None, # defaults to rc figure.edgecolor frameon=True, FigureClass=Figure, clear=False, **kwargs ):


fig=plt.subplot(2,2,1)
x=[1,2,3,4,5]
y=range(10,20)
def auto(x,y):
for x,y in zip(x,y):
fig.scatter(range(x),range(y))

#编制图形
fig=plt.subplot(2,2,1)
fig.scatter(range(4),range(4)) # 子图对象绘制散点图
fig,axs=plt.subplots(2,2,sharex=True,sharey=True,figsize=(14,8))
axs[0,0].scatter(range(5),range(5))
axs[0,1].scatter(range(5),list(range(5))[::-1]

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值