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. javascript的this关键字

    this永远指向函数运行时所在的对象!而不是函数被创建时所在的对象.也即:谁调用,指向谁.切记… 1.普通函数中的this 无论this身处何处,第一要务就是要找到函数运行时的位置. var name ...

  2. Failed to process import candidates for configuration class [com.simple.....]

    主要原因: 是因为自己定制的starter在打包时(package)用了spring-boot-maven-plugin,即在你的定制starter工程的pom.xml中有如下配置: <buil ...

  3. Configure the Stanford segmenter for NLTK

    >>> from nltk.tokenize.stanford_segmenter import StanfordSegmenter >>> segmenter = ...

  4. STL 小白学习(1) 初步认识

    #include <iostream> using namespace std; #include <vector> //动态数组 #include <algorithm ...

  5. 使用ssm(spring+springMVC+mybatis)创建一个简单的查询实例(二)(代码篇)

    这篇是上一篇的延续: 用ssm(spring+springMVC+mybatis)创建一个简单的查询实例(一) 源代码在github上可以下载,地址:https://github.com/guoxia ...

  6. bzoj1452

    题解: 二位树状数组 然后我开了300*300*300就T了 代码: #include<bits/stdc++.h> using namespace std; ; ],q; int fin ...

  7. elastic search 重要的系统配置

    文章翻译自 https://www.elastic.co/guide/en/elasticsearch/reference/current/file-descriptors.html 1.文件描述符 ...

  8. 多任务Forth系统内存布局

    body, table{font-family: 微软雅黑} table{border-collapse: collapse; border: solid gray; border-width: 2p ...

  9. mysql 判断某字段是否包含中文

    SELECT col FROM table WHERE LENGTH(col) != CHAR_LENGTH(col) LENGTH() 函数:返回字符串的长度,已字节符为单位 CHAR_LENGTH ...

  10. 深入path类

    Path类放在System.IO命名空间里.Path是一个只包含有静态方法的实例类,所以它不需要在使用之前实例化.它有各种方法用于处理文件的扩展名.文件名.根路径,以及和更多和路径相关的方面.下面就是 ...