【py code line 2】2023-02-17

本文介绍了如何使用Python的matplotlib库绘制散点图,并详细讲述了如何设置图表样式,包括设置线条宽度、图表标题、坐标轴标签、刻度样式等。还探讨了如何通过scatter()函数绘制不同大小和样式的点,以展示不同数据值。
摘要由CSDN通过智能技术生成

开始……
安装Matplotlib,用它来生成图表,使用pip来安装

python -m pip list 来查看现有安装的包模块

C:\Windows\system32>python -m pip list
Package    Version
---------- -------
pip        22.3
setuptools 65.5.0

[notice] A new release of pip available: 22.3 -> 23.0
[notice] To update, run: python.exe -m pip install --upgrade pip

更新pip

C:\Windows\system32>python -m pip install --upgrade pip
Requirement already satisfied: pip in e:\python\python311\lib\site-packages (22.3)
Collecting pip
  Downloading pip-23.0-py3-none-any.whl (2.1 MB)
     ---------------------------------------- 2.1/2.1 MB 27.2 kB/s eta 0:00:00
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 22.3
    Uninstalling pip-22.3:
      Successfully uninstalled pip-22.3
Successfully installed pip-23.0

安装matplotlib包

C:\Windows\system32>python -m pip install --user matplotlib
Collecting matplotlib
  Downloading matplotlib-3.7.0-cp311-cp311-win_amd64.whl (7.6 MB)
     ---------------------------------------- 7.6/7.6 MB 20.6 kB/s eta 0:00:00
Collecting contourpy>=1.0.1
  Downloading contourpy-1.0.7-cp311-cp311-win_amd64.whl (162 kB)
     ---------------------------------------- 163.0/163.0 kB 20.4 kB/s eta 0:00:00
Collecting cycler>=0.10
  Downloading cycler-0.11.0-py3-none-any.whl (6.4 kB)
Collecting fonttools>=4.22.0
  Downloading fonttools-4.38.0-py3-none-any.whl (965 kB
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值