如何从两个测量时间绘制连接点的图? [英] How to draw a plot joining points from two measurement times?

查看:38
本文介绍了如何从两个测量时间绘制连接点的图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

第一个问题在这里!我有两列数据,每一行都是一对值.我想垂直绘制第一列和第二列,并用一条线连接每对值,如下链接中的图所示:

First question here! I have two columns of data and each row are a pair of values. I want to plot the first column and the second column vertically and have a line connecting each pair of values, something that looks like this figure in the following link:

http://www.sciencedirect.com/science/article/pii/S0300957297000440#gr1

如果您知道如何使用任何工具,例如 R、python、perl、excel,请告诉我!

If you know how to do it, in any tools, such as R, or python, perl, excel, please let me know!

推荐答案

以及另一种使用 matpointsmatlines(和 R>boxplot)

And another R approach using matpoints and matlines (and boxplot)

dd <- data.frame(x=rnorm(15), y= rnorm(15))

boxplot(dd, boxwex = 0.3)
# note that you need to transpose `dd`
matpoints(y= t(dd), x= c(1.17,1.83),pch=19, col='black')
matlines(y= t(dd), x= c(1.2,1.8), lty=1, col = 'black')

这篇关于如何从两个测量时间绘制连接点的图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆