python点线图

A mixture of dot and line plot is called a Dot-Line plot. Each dot is connected through a line and it is the next version of the line plot. It maintains the discrete property of the points and also represents the correlation between consecutive points. It makes data visualization much better than an individual line or dot plot. Matplotlib provides this feature and with the following examples, we can better understand the implementation.

点线图的混合称为点线图。 每个点通过一条线连接,这是该线图的下一个版本。 它既保持了点的离散特性,又代表了连续点之间的相关性。 它使数据可视化远胜于单个线或点图。 Matplotlib提供了此功能,并通过以下示例,我们可以更好地理解实现。

1)标准点线图 (1) Standard Dot-Line Plot)

Syntax:

句法:

plt.plot(x, y,'o-')

  • x - names/numeric distribution

    x-名称/数字分布

  • y - length of the bar

    y-钢筋的长度

  • o- - instruction for dot-line

    o--虚线说明

2)点线较小的点线图 (2) Dot-Line Plot with Smaller Dot)

Syntax:

句法:

plt.plot(x, y,'o-')

  • x - names/numeric distribution

    x-名称/数字分布

  • y - length of the bar

    y-钢筋的长度

  • .- - instruction for dot-line with small dot

    .--带小点的虚线说明

3)不同颜色的点线图 (3) Dot-Line Plot with Different Color)

Syntax:

句法:

plt.plot(x, y,'o-')

  • x - names/numeric distribution

    x-名称/数字分布

  • y - length of the bar

    y-钢筋的长度

  • g.- - instruction for dot-line with small dot green color

    g。--小点绿色的虚线说明

虚线绘图的Python代码 (Python code for dot-line plotting)

import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(0.0, 5.0)
y = x*x
# default Plot
plt.subplot(2, 1, 1)
plt.plot(x, y, 'o-')
plt.title('Dot-Line Plot (1)')
plt.ylabel('Square')
plt.xlabel('numbers')
plt.show()
# Smaller dot
plt.subplot(2, 1, 2)
plt.plot(x, y, '.-')
plt.title('Dot-Line Plot (2): Smaller Dot')
plt.xlabel('numbers')
plt.ylabel('Square')
plt.show()
#colour Change
plt.subplot(2, 1, 2)
plt.plot(x, y, 'g.-')
plt.title('Dot-Line Plot (3): Colour Change')
plt.xlabel('numbers')
plt.ylabel('Square')
plt.show()

Output:

输出:

Output is as figure

翻译自: https://www.includehelp.com/python/dot-line-plotting.aspx

python点线图

python点线图_Python | 点线图相关推荐

  1. python画速度等值线图_python画contour图

    如何用python优雅的画出优雅的contour图 我们选择画一个双曲线的等contour图,其实contour图就是等高线图,那么我们以圆的图为例,即: . 在开始之前,我们需要先对matplotl ...

  2. python做动态折线图_python matplotlib折线图样式实现过程

    python matplotlib 同时画箱线图和折线图的问题 python3 matplotlib画两个折线图,X轴相同,Y轴生...你的memo和cpui里面是字符串,不是数字 将memo.app ...

  3. python画相关性可视化图_Python 可视化 | 关联图 - 散点图1

    什么是关联图? 关联图是查找两个事物之间关系的图像,他能为我们展示出一个事物随着另一个事物的变化如何变化. 典型的关联图有:折线图.散点图.相关矩阵等 我们什么时候会需要关联图? 1.数据报告 &am ...

  4. python箱线图_Python 箱线图 plt.boxplot() 参数详解

    Python 绘制箱线图主要用 matplotlib 库里 pyplot 模块里的 boxplot() 函数. plt.boxplot() 参数详解 plt.boxplot(x, # 指定要绘制箱线图 ...

  5. python制作雷达图_python制作雷达图

    雷达图是以从同一点开始的轴上表示的三个或更多个定量变量的二维图表的形式显示多变量数据的图形方法,雷达图通常用于综合分析多个指标,具有完整,清晰和直观的优点. 下面以实际例子给大家讲解一下雷达图的应用场 ...

  6. python画平行坐标图_Python实现平行坐标图的两种方法小结

    怎么用python实现一个坐标图的平移和缩放最容易想到的应该是DP算法,即取初始轨迹的起点A和终点B连线,计算每个点到这条线的距离,距离最大的点C若小于要分享误差则结束: 否则将C点加入压缩后的数据集 ...

  7. python编写选股公式_python 瀑布线指标编写实例

    我就废话不多说了,大家还是直接看代码吧! # -*- coding: utf-8 -*- """ Created on Tue May 23 08:57:02 2017 ...

  8. python日历图_Python绘制日历图和热力图

    本文以2019年全国各城市的空气质量观测数据为例,利用matplotlib.calmap.pyecharts绘制日历图和热力图.在绘图之前先利用pandas对空气质量数据进行处理. 2019年全国各城 ...

  9. python变量命名规则思维导图_Python思维导图详解

    Python思维导图 Python思维导图详解 第一阶段:学习Python基础语法,主要学习变量的使用以及类型.变量的计算和输入输出.变量的命名.运算符.if判断语句.while循环语句.字符串.常量 ...

最新文章

  1. Python的串口操作库pyserial
  2. 优化javaScript代码,提高执行效率
  3. Spark-1.6.0之Application运行信息记录器JobProgressListener
  4. 计算机组成原理译码器选择,计算机组成原理第三章习题参考解析.doc
  5. 【LeetCode】1.两数之和
  6. linux opencl(AMD) Example
  7. 字段的某记录相同,但是时间不同,找到MySQL里面最新的数据
  8. 哪个工厂不用加班,工资也不低?
  9. Android中插件开发篇之----类加载器
  10. 在centos7中安装nodejs(npm )
  11. 【转】嵌入式软件:C语言编码规范
  12. 关于eclipse反编译插件不起作用问题的解决
  13. 饿了么移动 APP 的架构演进
  14. 微信小程序登录界面的代码html,微信小程序用户登录组件
  15. java 阴阳历,java阳历转换成阴历
  16. 如何把vs2003转化成vs2005
  17. Docker + Gitlab + Gitlab CI(三)
  18. 2022年,英文科技论文写作与学术报告期末考试答案(仅供参考)
  19. 计算机图形学直线裁剪原理,计算机图形学-3.2用Liang-Barsky算法实现直线段裁剪...
  20. 云游戏深度报告:中国云游戏商业模式在哪里?

热门文章

  1. 时间同步服务器java,Windows 配置时间同步服务器以及配置时间同步间隔
  2. java多线程activemq,多线程JMS客户端ActiveMQ
  3. 运行shell脚本报错:“syntax error near unexpected token fi 的解决方法
  4. win10 利用安装包 安装 ssh
  5. 【数学】Floating-Point Hazard
  6. OpenCV-Python入门教程7-PyQt编写GUI界面
  7. DB2 存储过程中执行动态SQL的两种写法
  8. Quartz业务类无法注入Spring对象问题
  9. 分布式交换机配置备份和还原
  10. Ubuntu上安装Robomongo及添加到启动器