$sudo apt-get install python3-matplotlib

gyf@gyf-VirtualBox:~$ python3
Python 3.6.9 (default, Nov  7 2019, 10:44:02)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
>>> import matplotlib.pyplot as plt
>>> squares=[1,4,9,16,25]
>>> plt.plot(squares)
[<matplotlib.lines.Line2D object at 0x7f43fc0675f8>]
>>> plt.show()

After do that ,you will see a picture on your screen.Just try to do it.

But how to define X-axis?

import matplotlib.pyplot as plt
squares=[1,4,9,16,25]
input_values=[1,2,3,4,5]
plt.plot(input_values,squares,linewidth=5)#the first arg is X-axis,the next one is Y-axis
plt.show()
the result is as below:

use matplotlib to drew a table的更多相关文章

  1. Gym 100703I---Endeavor for perfection(尺取)

    题目链接 http://codeforces.com/problemset/gymProblem/100703/I Description standard input/outputStatement ...

  2. hdu4975 A simple Gaussian elimination problem.(正确解法 最大流+删边判环)(Updated 2014-10-16)

    这题标程是错的,网上很多题解也是错的. http://acm.hdu.edu.cn/showproblem.php?pid=4975 2014 Multi-University Training Co ...

  3. 概率质量函数:怀孕周期的PMF

    __author__ = 'dell' import surveyimport Pmfimport matplotlib.pyplot as pyplot table = survey.Pregnan ...

  4. hdu 4975 A simple Gaussian elimination problem.(网络流,推断矩阵是否存在)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4975 Problem Description Dragon is studying math. One ...

  5. A simple Gaussian elimination problem.(hdu4975)网络流+最大流

    A simple Gaussian elimination problem. Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65 ...

  6. hdu4975 网络流解方程组(网络流+dfs判环或矩阵DP)

    http://acm.hdu.edu.cn/showproblem.php?pid=4975 A simple Gaussian elimination problem. Time Limit: 20 ...

  7. py2exe打包整个项目

    这段时间做了用Python做了一个科学计算的项目,项目中用到了很多的第三方Python库,包括PyQt.traits.traitsui.matplotlib.pyface.table.numpy.tv ...

  8. HDOJ 4975 A simple Gaussian elimination problem.

    和HDOJ4888是一样的问题,最大流推断多解 1.把ISAP卡的根本出不来结果,仅仅能把全为0或者全为满流的给特判掉...... 2.在残量网络中找大于2的圈要用一种类似tarjian的方法从汇点開 ...

  9. HDU 4975 A simple Gaussian elimination problem.

    A simple Gaussian elimination problem. Time Limit: 1000ms Memory Limit: 65536KB This problem will be ...

随机推荐

  1. AJAX请求返回JSON数据动态生成html

    1:DeliveryPersonVO对象 package com.funcanteen.business.entity.delivery.vo; import java.util.List; impo ...

  2. 记一次NoHttpResponseException问题排查

    上传文件程序会有一定的概率提示错误,错误率大概在1%以下,错误信息是:org.apache.http.NoHttpResponseException , s3-us-west-1.amazonaws. ...

  3. 代码审计(1):sql注入漏洞

    挖掘经验:sql注入经常出现在登录界面.获取HTTP请求头.订单处理等地方.而登录界面的注入现在来说大多是发生在HTTP头里面的client-ip和x-forward-for,一般用来记录登录的ip地 ...

  4. Visual Studio C++覆盖率测试异常的解决方法

    默认的UnitTest可能出现这样的异常 经过查阅资料最终找到了解决办法 步骤如下: 在测试项目右键属性 将配置属性->链接器->调试 生成调试信息修改为如图所示,然后再进行覆盖率测试 就 ...

  5. [Tommas] ERP系统测试用例设计1(转)

    问题: 1.如何进行ERP系统测试用例设计? 2.ERP系统测试用例设计过程? 3.ERP系统测试用例设计的方法? ERP系统本身是一种业务流程很复杂,单据报表众多,逻辑性很强的系统,质量保证方面很难 ...

  6. 转:NGINX 基于nginx_upstream_check_module-master 健康检测及平滑升级

    https://www.cnblogs.com/linxizhifeng/p/7075325.html linux的nginx下安装tengine的nginx_upstream_check_modul ...

  7. ng -----监听变化($scope.$watch())

    需求:项目组件中遇到改变日期触发方法. 困难:日期组件中不涉及释焦功能 解决:在angularjs中用$scope.$watch() 其中name是字符串,是指监听到的具体对象值.

  8. [GoogleInterview]连续子序列问题

    Before the Beginning 本文为 Clouder 原创文章,原文链接为 https://www.codein.icu/gci-subarray/,转载时请将本段放在文章开头显眼处.如进 ...

  9. Java HotSpot(TM) Client VM 与 server VM 的配置

    在Linux 6.5 下安装Elasticsearch 出现错误: JVM is using the client VM [Java HotSpot(TM) Client VM] but should ...

  10. struts的错误回显