plot
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的更多相关文章
- matlab画图函数plot()/set/legend
简单plot()/legend/XY轴范围axis 除了坐标轴信息外还可以添加其它的信息,如所画曲线的信息等:测试代码如下 x=0:pi/20:2*pi; y1=sin(x); y2=cos(x); ...
- MATLAB的PLOT函数线型设置及横坐标为字符串的代码实例
2.横坐标为字符串的代码实例 cell={‘PLS’,’SVM’,’RF’,’NNET’,’NB’,’PLR’,’C5.0′,’PDA’,’KNN’,’GLM’,’BCT’};%分类方法yData=[ ...
- 【搬砖】【Python数据分析】Pycharm中plot绘图不能显示出来
最近在看<Python数据分析>这本书,而自己写代码一直用的是Pycharm,在练习的时候就碰到了plot()绘图不能显示出来的问题.网上翻了一下找到知乎上一篇回答,试了一下好像不行,而且 ...
- MATLAB plot 绘图的一些经验,记下来,facilitate future work
[转载请注明出处]http://www.cnblogs.com/mashiqi 2016/03/28 % 调整figure的位置scrsz = get(0,'ScreenSize'); % 这个命令是 ...
- R语言画全基因组关联分析中的曼哈顿图(manhattan plot)
1.在linux中安装好R 2.准备好画曼哈顿图的R脚本即manhattan.r,manhattan.r内容如下: #!/usr/bin/Rscript #example : Rscript plot ...
- Mac下 Octave 中plot 无法绘制
在coursera看机器学习课程的时候用到Octave来做数据处理,但是装了之后用plot画图时就会报错: set terminal aqua enhanced title "Figure ...
- MATLAB中plot()画图的颜色线型和希腊字母参数设置
y 黄色 · 点线 m 粉红 ○ 圈线 c ...
- 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 ...
- 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 ...
- plot bar chart using python
Example import matplotlib.pyplot as plt import plotly.plotly as py # Learn about API authentication ...
随机推荐
- 解决table宽度设置不起作用,由于内容问题被撑开 亲测 完美解决
1.在table 标签添加样式 table-layout: fixed; 必须设置width的值:<table style="table-layout: fixed"> ...
- Java入门自学笔记
一.变量 变量需要一个名字,变量的名字是一种“标识符”,意思是它是用来识别这个和那个的不同的名字. 标识符的构造规则:只能有字母.数字和下划线组成,数字不能在首位,java的关键字(保留字)不可以用做 ...
- python中 元组
#元组,不可变的list,一旦定义好就不可被改变,一般会用于连接数据库信息等:#他也是通过下标访问的#定义一个空的元组a=()t=('127.0.0.0',3306,'root','123456')t ...
- Learn how to use git
Git配置 $ git config --global user.name "Your Name" $ git config --global user.email "e ...
- 基于lnmp环境安装Discuz
安装环境 Linux:CentOS Linux release 7.5.1804 (Core) nginx:1.14.2 php-fpm:5.4.16 mariadb-server:5.5.60 基本 ...
- java service 安装
sudo ln -s /var/services/video/video-live.jar /etc/init.d/live-service sudo chmod +x /var/services/v ...
- poj1873(枚举+凸包)
The Fortified Forest Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 7291 Accepted: 2 ...
- shell中获取时间
获得当天的日期 date +%Y-%m-%d 输出: 2011-07-28 将当前日期赋值给DATE变量DATE=$(date +%Y%m%d) 有时候我们需要使用今天之前或者往后的日期,这时可以使用 ...
- My IELTS result has come out 我的雅思成绩出来了
Thanks to god, I finally get a score of 6.5, although my socres of listening and writing are only ...
- js 查找当前元素/this
function findTabTitle(pageId) { var $ele = null; $(".page-tabs-content").find("a.menu ...