当前位置:网站首页>r语言绘图参数(R语言plot画图)
r语言绘图参数(R语言plot画图)
2022-07-25 23:02:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
过去一个月实验比较忙,很久没有写点东西了,今天要给amina画图,因此学习了一下R语言的基础画图。ide
1.plot函数函数
plot(x,y,xlim=c(0,100),ylim=c(0.4,1), type=”o”,lwd=2,col=2,pch=24,cex=1.5, yaxs=”i”,xaxs=”i”, xlab=”Sample Ration(%)”,ylab=”Accuracy”)学习
x,y : 要画图的x轴内容和y轴内容spa
xlim,ylim: x轴和y轴的范围orm
type: 表示图的形状,是点、线、点线、阶梯线等等。htm
lwd: 线的宽度blog
col: 颜色get
pch: 点的形状it
cex: 点的大小
yaxs,xaxa: plot默认画图时会在预留一部分坐标空间,设置为“i”后,就能够去掉预留空间
xlab,ylab:x轴和y轴的名称
2. lines函数
当想要在一个图中画多条线时,能够用此函数
lines(LPPLPP~LPPx,col = “blue”,type = “o”,lwd = 2,pch=5)
3.grid 对图添加栅格
grid(nx=NA,ny=6,lwd=2)
nx,ny:分别表示x和y方向的虚线,当值为NA时,不对相应的方向分割,ny=6 表示将y轴等距分割为6段
4.abline
添加一条直线
abline(h=0.85,col=”black”,lty=1,lwd=2)
h: y轴方向的高度
v: x轴的位置
5.legend
添加图例
legend(“bottomright”,legend=c(“AC正确率”,”MI归一化互信息”),col=c(“blue”,”red”),pch=c(5,24),lty=1)
“bottomright” :图例的位置
legend: 内容
lty: 线的类型
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/127887.html原文链接:https://javaforall.cn
边栏推荐
- MatrixCube揭秘102——300行实现的完整分布式存储系统MatrixKV
- We media people must have four material websites, and don't worry about finding materials anymore
- Experiment 1, experiment 2 and Experiment 3 of assembly language and microcomputer principle: branch program design / loop program design / subroutine design
- HJ7 取近似值
- How painful is it to write unit tests?
- Zcmu--5015: complete the task
- QT的Tree View Model示例
- JVM memory area
- 冯诺依曼体系结构
- uvm_hdl——DPI在UVM中的实现(四)
猜你喜欢

Network Security Learning (11) scanning and blasting

Network Security Learning (XIV) IP protocol

invalid syntax
![[paper notes] a meta reinforcement learning algorithm for causal discovery](/img/03/84462b38551c41173f7a9734cb0e99.png)
[paper notes] a meta reinforcement learning algorithm for causal discovery

Von Neumann architecture

The small icon of notification setting shows a small square

互联网协议之 IPFS

Notification(状态栏通知)详解

Extended configuration of static routing in the second experiment

Websocket summary
随机推荐
【自然语言处理】【向量表示】AugSBERT:改善用于成对句子评分任务的Bi-Encoders的数据增强方法
为啥谷歌的内部工具不适合你?
access-list vs ip access-list
Common software shortcuts
Anaconda~Upload did not complete.
[tensorflow] about seed
Von Neumann architecture
Analysis of Excel file
SSH服务器CBC加密模式漏洞(CVE-2008-5161)
码蹄集 精准弹幕
Why should we launch getaverse?
2020-09-17
单元测试,写起来到底有多痛?
How painful is it to write unit tests?
QVariant的使用
Code shoe set precision barrage
Memory paging and tuning, kernel and user space
Mysql数据类型
Similarities and differences between equals and "= ="
JVM memory area