[R] Time Series-like barplot?

About this list Date view Thread view Subject view Author view Attachment view

From: Andy Bunn (abunn@montana.edu)
Date: Thu 20 Mar 2003 - 05:15:14 EST


Message-id: <NEBBIPHDAMMOKDKPOFFIGEIICHAA.abunn@montana.edu>

I have data structured like the following:

> foo.mat <- matrix(NA, ncol = 5, nrow = 10)
> foo.mat[2:6,1] <- 1
> foo.mat[1:3,2] <- 1
> foo.mat[3:10,3] <- 1
> foo.mat[1:10,4] <- 1
> foo.mat[8:10,5] <- 1
> foo.mat
      [,1] [,2] [,3] [,4] [,5]
 [1,] NA 1 NA 1 NA
 [2,] 1 1 NA 1 NA
 [3,] 1 1 1 1 NA
 [4,] 1 NA 1 1 NA
 [5,] 1 NA 1 1 NA
 [6,] 1 NA 1 1 NA
 [7,] NA NA 1 1 NA
 [8,] NA NA 1 1 1
 [9,] NA NA 1 1 1
[10,] NA NA 1 1 1

I am trying to create a plot with horizontal bars that has 1:10 on the
x-axis and plots the length of the data (i.e., 1) in the correct context.
E.g.,:

  5 ------
  4 --------------------
  3 ----------------
  2 -----
  1 ---------
   1-2-3-4-5-6-7-8-9-10

Does any body have a suggestion?

Thanks, Andy

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Tue 01 Jul 2003 - 09:11:25 EST