python点线图_Python | 点线图

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--虚线说明

Python | Dot-Line Plotting (1)

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

    .--带小点的虚线说明

Python | Dot-Line Plotting (2)

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 | Dot-Line Plotting (3)

虚线绘图的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点线图

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/543796.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Android Studio导入工程的正确姿势

为什么80%的码农都做不了架构师?>>> 如果你有很好的网络环境 好的网络环境,这里不是指:我家网速带宽100M,电信的光纤接入。 而是:能翻墙。因为如果本机的gradle和将要导入的工程版本不匹配,Stu…

BBIAF的完整形式是什么?

BBIAF:回来几场 (BBIAF: Be Back In A Few) BBIAF is an abbreviation of "Be Back In A Few". BBIAF是“几回去”的缩写 。 It is an expression, which is commonly used in messaging or chatting on social media networking sites like Facebook, …

为什么年轻人挣得很多还是穷?北上广深挑战指数报告~

又是年底,又到了做选择的时候。从“激情燃烧的岁月”到“何处安放的青春”,逃离北上广深的口号从未停止过,回到北上广深的呼喊更是一浪接着一浪。应届生们奔波忙碌,想有一份承载自己梦想的工作,想在异乡有一处安身之所…

apple组织名称是什么_什么是Apple Macintosh?

apple组织名称是什么苹果Macintosh (Apple Macintosh) Steve Jobs and Steve Wozniak has founded the line of computers in the year 1984, on the date 24th January, named it Apple Macintosh. Macintosh is shortly abbreviated as Mac. In this, various versions of co…

什么是Apple Desktop Bus? 亚行代表什么?

亚行:Apple桌面总线 (ADB: Apple Desktop Bus) ADB is an abbreviation of "Apple Desktop Bus". ADB是“ Apple Desktop Bus”的缩写 。 It is a low-speed proprietary bit-serial peripheral bus connecting devices to computers. In 1986, it was l…

CentOS 创建SVN 服务器,并且自动同步到WEB 目录

CentOS 创建SVN 服务器,并且自动同步到WEB 目录 标签: centossvnsubversion服务器2013-12-06 10:09 5492人阅读 评论(0) 收藏 举报分类:linux(5) 一、安装Subversion #yum install subversion二,基本的SVN服…

TTYL的完整形式是什么?

TTYL:稍后再与您交谈 (TTYL: Talk To You Later) TTYL is an abbreviation of Talk To You Later. It is an internet slang that is most generally used in text messaging, instant messaging, and chatting on Facebook, Twitter, WhatsApp, etc. The acronym i…

zhilizhili-ui 2016始动 开始做个样例站吧 (一)

对 我又挖坑了 不过其实也不算挖坑 因为ui构建中就会有填坑的文章 之前一直在写《编写大型web页面 结合现有前端形势思考未来前端》这是一篇巨难写的文章 估计要到年中才能写好了 写作的过程中 发生了国内前端大撕逼 2015的尾声大战 是否可以宣告前端是否开始新的时代 2016年 国…

python 网格_Python | 网格到情节

python 网格Most of the time, we need good accuracy in data visualization and a normal plot can be ambiguous. So, it is better to use a grid that allows us to locate the approximate value near the points in the plot. It helps in reducing the ambiguity and t…

2016年1月计划

开始试着每月做计划和总结,有节奏的规划自己的时间,一月计划: 1、hive那本书拖了很久了,一月一定会看完。 2、因为跟着阚爷的风准备试着做一下讲师,分配给我的是推荐这块,所以网上多找找做推荐的资源&#…

slr1文法_SLR的完整形式是什么?

slr1文法单反:单镜头反光 (SLR: Single Lens Reflex) SLR is an abbreviation of Single Lens Reflex. It is used in high standard cameras. SLR makes use of an automatic moving mirror arrangement that makes it possible for photographers to perceive pre…

vim快捷键2

一、移动光标 1、左移h、右移l、下移j、上移k 2、向下翻页ctrl f,向上翻页ctrl b 3、向下翻半页ctrl d,向上翻半页ctrl u 4、移动到行尾$,移动到行首0(数字),移动到行首第一个字符处^ 5、移动光标到下一…

FYR的完整形式是什么?

财政年度:供您参考 (FYR: For Your Reference) FYR is an abbreviation of "For Your Reference". FYR是“供您参考”的缩写。 It is an expression, which is commonly used in the Gmail platform. It is written as a follow-up message for the info…

UIScrollView的简单使用

- UIScrollView 介绍 问&1.UIScrollView 是干什么的? • UIScrollView 也是一种控件,继承自UIView。• 用来实现”滚动”和”缩放”的控件 什么是UIScrollView? UIScrollView是一个能够滚动的视图控件,可以用来展示大量的内容&#xf…

什么是苹果耳塞?

苹果耳塞 (Apple Earbuds) Apple Earbuds are another sound device made by Apple on 23rd October 2001. It is an in-ear sound device and it has been included in all the mobile and music devices of Apple. Apple Earbuds are quite comfortable and easy to handle w…

趣说游戏AI开发:对状态机的褒扬和批判

0x00 前言 因为临近年关工作繁忙,已经有一段时间没有更新博客了。到了元旦终于有时间来写点东西,既是积累也是分享。如题目所示,本文要来聊一聊在游戏开发中经常会涉及到的话题——游戏AI。设计游戏AI的目标之一是要找到一种便于使用并容易拓…

类中函数模板 typeof_Julia中的typeof()函数

类中函数模板 typeofJulia| typeof()函数 (Julia | typeof() function) typeof() function is a library function in Julia programming language, it is used to get the concrete type of the given value or variable. typeof()函数是Julia编程语言中的库函数,…

sencha touch调试时Please close other application using ADB: Monitor, DDMS, Eclipse

1、运行——cmd—— netstat -aon|findstr "5037" 2、打开任务管理器,查看所有进程 显示进程pid(文件-查看)--查找pid7740的结束。转载于:https://www.cnblogs.com/taoshengyujiu/p/5099588.html

定时器mia是什么意思_MIA的完整形式是什么?

定时器mia是什么意思MIA:行动失踪 (MIA: Missing In Action) MIA is an abbreviation of "Missing In Action". MIA是“缺少行动”的缩写。 It is an expression, which is commonly used in the Gmail platform. It is written to show that the origin…

window下自己主动备份数据库成dmp格式的bat写法

复制以下的命令到一个txt文本文档&#xff0c;然后改动相应的參数为自己须要的參数&#xff0c;一切完毕之后&#xff0c;将文件保存为bat格式。这样每次须要备份的时候仅仅须要双击一下这个bat文件。其它的都不用你了&#xff0c;你仅仅须要静静的等待……</pre><pre…