boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Mathematics版 - 新人请教一下用R做一个简单graph问题 (转载)
相关主题
matlab画图的问题
问下 无理数的limit point
AmEx Business Gold Card - 50k Points Limited offer
Help on graphs
Vertex Cover in Cubic Graph
请问一个概率问题。
graph question: what is "genus" ?
我问关于matlab 画图
问个概率题,谢谢先。 (转载)
请问那位大侠知道用maple 的plot 作如下事情啊
相关话题的讨论汇总
话题: col话题: graph话题: pch话题: blue话题: points
进入Mathematics版参与讨论
1 (共1页)
h*****o
发帖数: 1476
1
【 以下文字转载自 Statistics 讨论区 】
发信人: haipiao (海漂), 信区: Statistics
标 题: 新人请教一下用R做一个简单graph问题
发信站: BBS 未名空间站 (Tue Jan 25 19:16:11 2011, 美东)
没用过R,但只有R是免费的,所以下载了想做个graph,关于工作的一个presentation。
如果用R做一个附件中的两个graph,请问code怎么写?小红圈代表已知点。
最好做出的graph也能用不同颜色分别显示点和线,比如红色的点,蓝色的线。
非常感谢。
y******d
发帖数: 65
2
graph on the left
plot(1,1,type="n",xlim=c(1,5),ylim=c(1,5))
lines(c(2:4),c(4:2),lty=1,col="red")
points(2,4,pch=21,col="blue")
points(4,2,pch=21,col="blue")
graph on the right
plot(1,1,type="n",xlim=c(1,5),ylim=c(1,5))
lines(c(1:2),rep(2,length(c(1:2))),lty=1,col="red")
lines(c(2:3),rep(3,length(c(1:2))),lty=1,col="red")
lines(c(3:4),rep(4,length(c(1:2))),lty=1,col="red")
points(1,2,pch=21,col="blue")
points(2,2,pch=19,col="blue")
points(2,3,pch=21,col="blue")
points(3,3,pch=19,col="blue")
points(3,4,pch=21,col="blue")
points(4,4,pch=19,col="blue")
you have to adjust the limits of the graph and the color of the graph by
using these codes.
1 (共1页)
进入Mathematics版参与讨论
相关主题
请问那位大侠知道用maple 的plot 作如下事情啊
问个巨简单的问题
a question
求一道概率题
求教一个简单的curve generator software
怎样在R里面调用Fortran?
再问个数学问题
问一个优化问题的解法
再问个多项式
问个linear programming问题
相关话题的讨论汇总
话题: col话题: graph话题: pch话题: blue话题: points