Displaying 20 results from an estimated 7000 matches similar to: "matplot.Date & matplot.POSIXct"
2020 Jan 28
4
matplot.Date & matplot.POSIXct
????? Thanks for the reply.
On 2020-01-27 19:56, Abby Spurdle wrote:
> Maybe I'm missing something really obvious here, but I was unable to
> create a matrix out of POSIXct object(s).
> Perhaps that deserves a separate discussion...?
????? Can you provide an example?
????? The standard matplot application that concerns me is with
matplot(x, y, ...) where x has class Date or
2020 Jan 28
0
matplot.Date & matplot.POSIXct
>>>>> Spencer Graves
>>>>> on Mon, 27 Jan 2020 23:02:28 -0600 writes:
> ????? Thanks for the reply.
> On 2020-01-27 19:56, Abby Spurdle wrote:
>> Maybe I'm missing something really obvious here, but I was unable to
>> create a matrix out of POSIXct object(s).
>> Perhaps that deserves a separate discussion...?
yes,
2020 Jan 28
1
matplot.Date & matplot.POSIXct
On 2020-01-28 05:13, Martin Maechler wrote:
>>>>>> Spencer Graves
>>>>>> on Mon, 27 Jan 2020 23:02:28 -0600 writes:
<snip>
>
> Still, as Abby mentioned, turning a simple function into the
> default method of an S3 generic is easy to do, but comes with a
> bit of cost, not just S3 dispatch which typically is negligable in
> graphics,
2006 Dec 07
2
Matplot does not work with x being POSIXt class (PR#9412)
Hi,
Matplot works with x being Date class but not POSIXt. Here is the
example with R version 2.5.0 Under development (unstable) (2006-12-06
r40129)
Example:
x <- Sys.Date() - c(1:10)
y <- cbind(1:10, 10:1)
class(x)
## [1] "Date"
matplot(x, y)
x <- strptime(as.character(x), format="%Y-%m-%d")
## [1] "POSIXt" "POSIXlt"
matplot(x, y)
Error in
2020 Jan 28
0
matplot.Date & matplot.POSIXct
> > Maybe I'm missing something really obvious here, but I was unable to
> > create a matrix out of POSIXct object(s).
> > Perhaps that deserves a separate discussion...?
> Can you provide an example?
------
#date and time objects
x = Sys.Date () + 1:16
y = as.POSIXct (x)
#matrices
str (matrix (x, 4, 4) )
str (matrix (y, 4, 4) )
------
Creating a matrix from a Date
2011 Jul 12
1
matplot with dates/times on horizontal axis
>matplot(timestamp,xymatrix,type='l')
where timestamp is a vector filled with POSIXct objects and xymatrix is
a numeric 2x2 matrix plots but the horizontal axis labels are raw
unformatted timestamps.
I would like to format these in any of the available codes for strftime,
for instance format="%H:%M".
Passing a vector of formatted strings does not work. Any obvious other
2010 May 05
1
'matplot' for matrix with NAs: broken lines
Hi list,
I know that points involving NAs are not plotted in 'matplot', but when I plot them as lines, I still want the lines to connect all the points (i.e. not broken where there are NAs).? Please see the example below.? How can I achieve this in 'matplot'?? If I can't, any good alternatives so I don't have to use 'plot' + 'lines' and loop through all the
2007 Mar 12
1
Can one set box line width within the matplot command?
Hello R users --
I am using matplot to prepare graphs and cannot find a way to use (for
example) box(lwd=3) within the matplot command and instead have been
setting the box line width after drawing the graph, by using box(lwd =
3). Looking over the ?par options and the matplot() help I do not see a
way to set box width within matplot. Is there such an option?
Thanks for suggestions,
2008 Oct 15
2
Help with matplot
Hi, I apologise in advance for the na?ve question. I have large matrices that I want to plot. I currently use color2D.matplot. However, these matrices contain many values of no interest (i.e. where there is no data, the figure -999 is automatically displayed). Is there any way of removing these from the matrices to be plotted by matplot? An obvious possibility is setting them all to 0, but that
2008 Jun 17
2
color2D.matplot axis names
Hi,
I finally came up with a nice colored matrixplot, using the color2D.matplot
function of the plotrix package. But I can't assign xtics and ytics to this
plot. I made sure that the matrix has correct colnames() and rownames().
Here's what I do:
a=matrix(1:16, 4, 4)
colnames(a) <- c("X1", "X2", "X3", X4)
rownames(a) <- c("Y1",
2010 Mar 06
1
color2D.matplot not giving colors
I am using color2D.matplot to plot a matrix about 400 by 200.
The values in the matrix are 0:5 and NA. The resulting plot is not color, but shaded b/w. I tried to figure out how to add colors, I would like something like c(blue, green, red, cyan, green)
#example
motifx <- matrix(NA, nrow=100,ncol=20)
motifx[,1:5] <- 1
motifx[,6:10] <- 2
motifx[,11:15] <- 3
motifx[,15:19] <- 4
2006 Jun 29
1
inconsistent matplot behaviour?
I raised this question quite some time ago but it quitly went down the
river. I'll give it a second try (before keeping my modified version of
matplot for ever...):
matplot supports vectors (and/or character strings) for a number of
arguments namely `type', `lty', `lwd', `pch', `col', `cex'. all of them
act consistently in such a way that the first entries are used
2009 Mar 23
2
matplot does not considere the parametre lend (PR#13619)
Full_Name: Christophe Genolini
Version: 2.8.1, but also 2.9
OS: Windows XP
Submission from: (NULL) (82.225.59.146)
I am using matplot with the option lend="butt", but only the first line (the
black) is printed correctly :
> matplot(matrix(1:9,3),type="c",lwd=10,lty=1,lend="butt")
Gabor Grothendieck find the problem in matplot code:
the ... is passed to plot
2009 Apr 16
2
error bars in matplot
Hi,
I was trying to get error bars in my matplot. I looked at an earlier thread, and the sample code that I made is:
#------------------
library(plotrix)
mat1 <- matrix(sample(1:30,10),nrow=5,ncol=2)
ses <- matrix(sample(1:3,10,replace=T),nrow=5,ncol=2)
vect <- seq(20,100,20)
rownames(mat1) <- rownames(ses) <- vect
colnames(mat1) <- colnames(ses) <- letters[1:2]
2007 Nov 06
1
color2D.matplot
I am a true R novice aonly using it for this function ;)
I am trying to use color2D.matplot to form a image of my data using the
following conditions
color2D.matplot(fi1, c(dr), c(dg), c(db), nslices=7, ylab='Species',
xlab="gene", show.legend=TRUE) where fi1 is my matrix.
I have a matrix with 36 columns and 130 rows. most entries are 1 or 0 and I
am trying to get this
2010 Apr 21
1
Unexpected warning from matplot
n <- 63
a <- 1:n
x <- a-1
y <- outer(x,a)
matplot(x,y,type='l')
Warning message:
In matplot(x, y, type = "l") :
default 'pch' is smaller than number of columns and hence recycled
Why is it complaining if I specifically ask for type="l", so no pch
involved?
Annoyance or feature?
The fix (if needed) is simple. In the matplot code change:
if
2009 Sep 28
2
Data formatting for matplot
Dear List,
I am wanting to produce a multiple line plot, and know I can do it with matplot but can't get my data in the format I need. I have a dataframe with three columns; individuals ID, x, and y. I have tried split() but it gives me a list of matrices, which is closer but not quite what I need. For example:
id<-rep(seq(1,5,1),length.out=100)
x<-rnorm(100,5,1)
2011 Jul 21
1
How to set Color scale for color2D.matplot()
Hello, everyone.
I am trying to show the correlation matrix using
color2D.matplot(). And I want to map (0,1) to (dark red to dark green).
But by default color2D.matplot() will map(min element of given matrix,
max element of given matrix) to (dark red to dark green).
Can anyone help me with this issue?
Thanks a lot!
Youcheng Lin
____________
[[alternative HTML version deleted]]
2007 Oct 30
1
data.frame, ggplot vs matplot
Hello,
I've been trying to use ggplot, but I cannot seem to get my data in
the correct form. I usually have a vector x, and a matrix y and I
would usually use matplot(x,y) to plot the columns of y against x.
Now, if i understand correctly, I should cast x and y into a
data.frame and do something like ggplot(x,y,data=data). I think I'm
missing something here: do I really need to
2010 Aug 14
1
cca biplot (vegan) failed in matplot
Dear List,
I am trying to plot the result of cca using matplot but failed.
Pls kindly help and thanks.
Elaine
The error message was
error in xy.coords(x, y, xlabel, ylabel, log = log) :
(list) object cannot be coerced to type 'double'
code
rm(list=ls())
library(vegan)
library(MASS)
# input richness
birdrich