scatter
import pandas as pd
df_train=pd.read_excel(r"C:\Users\Liugengxin\Desktop\回归.xlsx")
Y = '森林火灾次数'
X = '人口'
data = pd.concat([df_train[X], df_train[Y]], axis=1)
data.plot.scatter(x=X, y=Y, ylim=(0,1.2))

boxplot

matlab

a=xlsread('C:\Users\Liugengxin\Desktop\test.xlsx','sheet1');
%x is lable(country,credit) y is value
x=a(:,2)
y=a(:,1)
boxplot(y,x)

python

import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pd
df_train=pd.read_excel(r"C:\Users\Liugengxin\Desktop\课程\数据科学\大作业\原始数据\train.xlsx")
var = 'OverallQual'
data = pd.concat([df_train['SalePrice'], df_train[var]], axis=1)
f,ax = plt.subplots(figsize=(8,6 ))
fig = sns.boxplot(x=var, y="SalePrice", data=data)
fig.axis(ymin=0, ymax=800000);

plot的更多相关文章

  1. matlab画图函数plot()/set/legend

    简单plot()/legend/XY轴范围axis 除了坐标轴信息外还可以添加其它的信息,如所画曲线的信息等:测试代码如下 x=0:pi/20:2*pi; y1=sin(x); y2=cos(x); ...

  2. MATLAB的PLOT函数线型设置及横坐标为字符串的代码实例

    2.横坐标为字符串的代码实例 cell={‘PLS’,’SVM’,’RF’,’NNET’,’NB’,’PLR’,’C5.0′,’PDA’,’KNN’,’GLM’,’BCT’};%分类方法yData=[ ...

  3. 【搬砖】【Python数据分析】Pycharm中plot绘图不能显示出来

    最近在看<Python数据分析>这本书,而自己写代码一直用的是Pycharm,在练习的时候就碰到了plot()绘图不能显示出来的问题.网上翻了一下找到知乎上一篇回答,试了一下好像不行,而且 ...

  4. MATLAB plot 绘图的一些经验,记下来,facilitate future work

    [转载请注明出处]http://www.cnblogs.com/mashiqi 2016/03/28 % 调整figure的位置scrsz = get(0,'ScreenSize'); % 这个命令是 ...

  5. R语言画全基因组关联分析中的曼哈顿图(manhattan plot)

    1.在linux中安装好R 2.准备好画曼哈顿图的R脚本即manhattan.r,manhattan.r内容如下: #!/usr/bin/Rscript #example : Rscript plot ...

  6. Mac下 Octave 中plot 无法绘制

    在coursera看机器学习课程的时候用到Octave来做数据处理,但是装了之后用plot画图时就会报错: set terminal aqua enhanced title "Figure ...

  7. MATLAB中plot()画图的颜色线型和希腊字母参数设置

    y         黄色           ·             点线      m         粉红           ○             圈线      c          ...

  8. gnuplot conditional plotting: plot col A:col B if col C == x

    http://stackoverflow.com/questions/6564561/gnuplot-conditional-plotting-plot-col-acol-b-if-col-c-x H ...

  9. hdu5024 Wang Xifeng's Little Plot (水

    http://acm.hdu.edu.cn/showproblem.php?pid=5024 网络赛 Wang Xifeng's Little Plot Time Limit: 2000/1000 M ...

  10. plot bar chart using python

    Example import matplotlib.pyplot as plt import plotly.plotly as py # Learn about API authentication ...

随机推荐

  1. yii中的restful方式输出并调用接口和判断用户是否登录状态

    //创建一个控制器接口 返回的是restful方式 <?php namespace frontend\controllers; use frontend\models\Fenlei; use f ...

  2. Luffy之结算订单页面(订单模型表的创建,订单的生成,以及订单详情展示等)

    订单页面 在前面我们已经构建了,购物车的页面,接下来到了结算页面 1.首先,在购物车页面点击去结算按钮时,我们需要做如下动作 .前端发送生成订单的请求,点击标签内触发事件 create_order t ...

  3. 『Python』装饰器

    一.参考 作者:zhijun liu 链接:https://www.zhihu.com/question/26930016/answer/99243411 来源:知乎 建议大家去原答案浏览 二.装饰器 ...

  4. 『高性能模型』深度可分离卷积和MobileNet_v1

    论文原址:MobileNets v1 TensorFlow实现:mobilenet_v1.py TensorFlow预训练模型:mobilenet_v1.md 一.深度可分离卷积 标准的卷积过程可以看 ...

  5. 关于antd 日期组件只选择年份,设置mode=year无法获取value的解决办法

    antd3.0后的某个版本后终于支持了只选择年份的设置.当时2.x版本的时候还不支持只选择年份,我们项目中有这个只选择年份的需求,为了ui风格的一致,只好自己撸了一个. 如今真是普天同庆!

  6. python dpkt SSL 流tcp payload(从三次握手开始到application data)和证书提取

    # coding: utf-8 #!/usr/bin/env python from __future__ import absolute_import from __future__ import ...

  7. test pthread code

    #include <iostream> #include <pthread.h> using namespace std; ; void * add(void *); pthr ...

  8. css3 二级菜单

    <!doctype html><!--<!DOCTYPE> 声明位于文档中的最前面的位置,处于 <html> 标签之前.此标签可告知浏览器文档使用哪种 HTM ...

  9. UVa 10382 - Watering Grass 贪心,水题,爆int 难度: 0

    题目 https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&a ...

  10. Hide Data into bitmap with ARGB8888 format

    将保存重要信息,如银行卡密码的文本文件隐藏到ARGB8888的A通道. bitmap.h #ifndef BMP_H #define BMP_H #include <fstream> #i ...