Displaying 20 results from an estimated 30000 matches similar to: "Defining range of x and y axis in pairs()"
2010 Aug 31
1
"pairs" with same xlim and ylim scale
Hi list,
I have a function which basically is a wrapper of pairs with some useful panel
functions. However, I'm having trouble to pass the "xlim" and "ylim" into the
function so the x and y axes are in the same scale and 45 degree lines are
exactly diagonal. I've looked at some old posts, they didn't help much. I
think this is b/c I have multiple panel
2004 Sep 22
1
pairs, panel.functions, xlim and ylim
Hi,
I have the following problem.
I wanted to get a matrix of scatterplots and I used pairs.
I wanted to add the line y=x in each plot and I created a panel
function for this scope.
I used points and abline in the following way:
## put y=x in each plot
panel.lin<- function(x, y)
{
points(x,y, pch=21, bg=par("bg"), col = "black",cex=2)
2013 Oct 10
1
pairs plot
my data are matrix with 3 numeric columns.
would like to have pairs plot
with scatterplots in the upper
with hist at the diag
and with correlation at the lower.
actually default pairs does almost what I want but looks semi awesome.
Especially, i didn't find out how to remove the axes from the lower
part where I do only want to display the numeric values correlations
there and somehow axes
2008 Oct 30
1
A question about pairs()
Greetings R users,
I am an R graphics newbie trying to produce a custom trellis plot using
pairs() with R 2.7.2.
I have spatial data on which I run a geographically weighted regression
(gwr, using the -spgwr- package). I want to check the gwr coefficients
for multicollinearity and spatial association, following Wheeler and
Tiefelsdorf (2005), and I would like to summarize the results of this
2013 Mar 29
1
pairs(X,Y) analog of cor(X,Y)?
With a data frame containing some X & Y variables I can get the between
set correlations
with cor(X,Y):
> cor(NLSY[,1:2], NLSY[3:6])
antisoc hyperact income educ
math 0.043381307 -0.07581733 0.25487753 0.2876875
read -0.003735785 -0.07555683 0.09114299 0.1884101
Is there somewhere an analog of pairs(X,Y) that will produce the pairwise
plots of each X against each
2004 Sep 14
1
pairs correlations colors
I have the following problem.
I want to use pairs function and get a matrix of scatterplots with the
correlations in the upper panel and the ordinary scatterplots in the
lower panel.
Moreover, I want to have points colored in five differet ways in the
lower panel, because I have five subgroups.
In order to do that I tried to combine examples on pairs function help.
I got a colored matrix
2009 Apr 20
3
How to force axis to have the same range
Dear R-users,
I am trying to produce (standard and trellis) scatterplots which use the
same range of the x and y axes. In addition, I would like the plots to
be physically square. Is there one or more specific argument(s) to plot
and xyplot what would do that? I have looked at various combinations of
asp and pin value, but could not get what I wanted..
Thank you in advance for your help
2009 Oct 07
2
Second y-axis --- alternative to par(new=
Hi
is there an alternative to par(new), for ading data to a plot for a
different y-axis?
My problem with par(new=TRUE) is, that it re-defines all axis and labels (as
in example 1) and one has to use xlim=... to fix the x-axis.
I am looking for something, which simply resets the y-axis, so that a new
plot() (or points()/lines()) keeps the x-axis, but re-defines the y-axis.
Is there something
2011 Jan 12
3
Problems creating a PNG file for a dendrogram: "Error in plot.window(...) : need finite 'xlim' values"
Has anyone successfully created a PNG file for a dendrogram?
I am able to successfully launch and view a dendrogram in Quartz. However, the dendrogram is quite large (too large to read on a computer screen), so I am trying to save it to a file (1000x4000 pixels) for viewing in other apps. However, whenever I try to initiate a PNG device, I get a "need finitite 'xlim' values"
2010 Sep 30
2
panel.pairs in splom
Hello,
I have a customized pairs () fonction as follows that displays correctely my
data.
------------------------------------------------------------------------
panel.cor1 <- function (x, y, digits=2, prefix="")
{
usr <- par("usr"); on.exit(par(usr))
par(usr = c(0, 1, 0, 1))
r <- cor(x, y,use="pairwise.complete.obs",
2007 Oct 18
5
Secondary Y axis title
I have the following R code to create a plot with two y axes. I am
essentially trying to
plot a price series with a volume series on the same graph. (i.e. to
compare price with volume). I can label the first
y axis successfully, but the problem is in labeling the 2nd y-axis.
Essentially, the
label never appears. It seems as though there is not enough margin
on the right hand
side of
2007 Mar 22
1
Labelling a second y-axis
Hi,
I am using the following code as an example function to create
multiple y-axes on one plot. I have it working fine however, I can't
seem to add a label on the second (right) axis. I have tried adding
ylab="y2" in the axis call but, that didn't work; any ideas?
Thanks,
Jesse
Code:
function() {
par(las=1,xaxs="r",mai=c(1,0.75,1,1))
x<-1:10
y1<-x
2008 Aug 24
1
howto optimize operations between pairs of rows in a single matrix like cor and pairs
Hi,
I calculating the output of a function when applied to pairs of row from
a single matrix or dataframe similar to how cor() and pairs() work. This
is the code that I have been using:
pairwise.apply <- function(x, FUN, ...){
n <- nrow(x)
r <- rownames(x)
output <- matrix(NA, nc=n, nr=n, dimnames=list(r, r))
for(i in 1:n){
for(j
2010 Nov 10
3
plot & xlim/ylim & range of axis
Dear mailing list readers!
Using R and the plot function I stumbled over this little issue:
plot(x=NULL,
y=NULL,
xlim=range(1:10),
ylim=range(1e-9:1),
log="y")
produces an plot empty plot, where the y-axis is in the specified range.
Changing ylim to
ylim=range(1e-9:1e-3)
creates an y-axis in the range of 1e-12 to 1e-6. This appearance of the
y-axis is a
2013 Jul 10
0
how to adjust the x axis range based on y axis data
I am using R studio version 0.97.336.
I am trying to produce multiple figures based on a large data set (98010 rows). I am creating a plot for each TITLE (related to a variable/station combination).
#Create a plot for each Title. Save all plots as jpegs in folder named "SkeenaQfigs"
for(i in 1:nlevels(dt$TITLE)){
tmp.title <- subset(dt, TITLE == levels(dt$TITLE)[i])
#save
2017 Jul 31
0
Superscript and subscrib R for legend x-axis and y-axis and colour different subjects in longitudinal data with different colours
Hi Rosa
something like
plot(1,1, sub=expression(lambda^"2"))
So with your example, do you want something like
plot(c(1:5), CRP7raw[1,], type = "n", xlim=c(1,5), ylim=c(-10,5) ,
xlab="Day in ICU",
ylab="CRP (mg/dL)",
sub = mtext(expression(lambda^2)))
CRP7graph <- apply(CRP7, 1, lines, col="gray")
Cheers
Petr
>
2017 Jul 28
3
Superscript and subscrib R for legend x-axis and y-axis and colour different subjects in longitudinal data with different colours
I am trying to make a x-axis and y-axis titles with both a special character and a subscript. I am not being able to do this. I think its just a placing of my parenthesis, but I've tried (seemingly) everything.
Even more, when I try the blog users code it works.
Is it because I?m using longitudinal data?
Even more. Is it possible to colour each one of the 15 lines with a different
2017 Jul 31
0
Superscript and subscrib R for legend x-axis and y-axis and colour different subjects in longitudinal data with different colours
Hi Martin
see in line
> -----Original Message-----
> From: Martin Maechler [mailto:maechler at stat.math.ethz.ch]
> Sent: Monday, July 31, 2017 10:52 AM
> To: PIKAL Petr <petr.pikal at precheza.cz>
> Cc: Rosa Oliveira <rosita21 at gmail.com>; r-help mailing list <r-help at r-
> project.org>
> Subject: Re: [R] Superscript and subscrib R for legend x-axis and
2007 Oct 02
1
splom pairs and groups argument
Hello,
I'm trying to pull off a certain graph using splom, and can't quite get my panel functions right.
Basically, the equivalent using pairs would be something like this (using iris data set as an example):
panel.corval <- function(x, y, digits=2, prefix="", cex.cor,col,pch)
{
usr <- par("usr"); on.exit(par(usr))
par(usr = c(0, 1, 0, 1))
2008 Nov 14
1
ellipse in pairs plot
Hi dear list,
I'm scrambling with this:
i have a p-dimensional data frame for which i want to have a pairs() plot, with ellipse added in each lower.panel.
I want the ellipse's parameter (mu, sigma) to be extracted from the appropriate entries in a pre-computed matrix ("dab" in the code below).
Can it be done ?
Thanks in advance,
melly<-function (x, y, col =