Displaying 20 results from an estimated 128 matches for "opar".
Did you mean:
opal
2006 Apr 28
4
par(mfror=c(1,2))
dear list,
i have a problem using the par function.
in one graphic device i want to have two plots so i tried to use
par(mfror=c(1,2)).
of course it worked out, but the height now is twice the length of the width
for each single plot.
what i actually wanted is something like par(mfrow=c(2,2)) where only the
top (or bottom)
two plots are drawn with entire length proportions of 1 to 2 ( height 1,
2007 Jan 02
3
graphical parameters: margins
Hi all,
Please, while using image() which is the graphical parameter which control the space between ylab and the y axis? I do need to write a number of relatively long y labels and I am not able the control, if possible, this space.
See the effect I need to avoid...
http://nvx.environmentalchange.net/@rrodriguez/images/overlapping.jpg
Thanks for your help,
Ricardo
--
Ricardo Rodr?guez
Your
2005 Jul 13
1
unexpected par('pin') behaviour
...my scripts 'layout' is used to
generate a (approx. square) grid of variable dimensions (depending on
no. of input files). if the no. of subplots (grid cells) becomes
moderately large (say > 9) I use a construct like
###layout grid computation and set up occurs here###
...
opar <- par(no.readonly = T);
on.exit(par(opar))
par(mar=c(4.1, 4.1, 1.1, .1))
###plotting occurs here####
...
to reduce the figure margins to achieve a more compact display. apart
from 'mar' no other par() setting is modified.
this works fine until the total number of subplot...
2007 Oct 30
0
Plotting question: how to plot SNP location data?
...se different
colours to represent these categories. The script below generates the
sample data. I can plot these with the image function using the
following:
val <- 1:3
samp <- sample(val, 100, replace=TRUE)
z <- matrix(samp, nrow=20, ncol=4, byrow=TRUE)
SNP <- 1:20
siblings <- 1:4
opar <- par(cex=0.7)
image(SNP, siblings, z, col=c("blue", "red", "black"), axes=FALSE,
ann=FALSE)
axis(1, at=1:20, labels=paste(rep("SNP", 20), 1:20), las=2)
axis(2, at=1:4)
mtext("sibling", 2, line=3)
title(main="Specific SNPs in Chr 1")
p...
2011 Feb 22
2
Plotting a functional time series
...5,to=5)$y)
grid <- density(x[,1], from=-5,to=5)$x
win.graph()
persp(grid1, 1:10, f,theta=-50, phi=30, d=2)
-----------------------------------------------------------------
That is, I simply want to stack the curves
-----------------------------------------------------------------
win.graph()
opar <- par(mfrow=c(5,2), mar=c(2,2,1,1))
sapply(1:10, function(i)plot(grid, f[,i], ann=FALSE, type="l"))
par(opar)
-----------------------------------------------------------------
into a functional time series plot (unlike the example above, I'm
working with pdf's which are not i...
2006 May 16
3
multiple plots in a function()
Dear all,
I have the following problem:
I have written a function genereating to plots, eg
myfunction <- (data, some.parameters) {
#some calculations etc
.
par (mfrow=c(1,2))
plot1(......)
plot2(.....)
}
which works fine. But for analysing several variants, I tried a slope, eg:
par (mfrow=c(5,5))
for ( i in 1:10) {
myfunction(data, i)
}
Off
1997 Jul 28
0
R-alpha: R 0.50.a1: small patches for graphics and image demo
...********
*** 1,5 ****
###-*- R -*-
! par(ask = interactive() && .Device == "X11") # For source
# Here is some code which illustrates some of the differences between
# R and S graphics capabilities. Note that colors are generally specified
--- 1,6 ----
###-*- R -*-
!
! opar <- par(ask = interactive() && .Device == "X11") # For source
# Here is some code which illustrates some of the differences between
# R and S graphics capabilities. Note that colors are generally specified
*************** data("volcano")
*** 115,121 ****
x &l...
2006 Dec 20
3
How to use strings from a data.frame as the argument of an expression() for plot
Greetings,
I would like to use a data.frame with strings to feed
the expression() in the title of a plot. The way I did
this is:
molecules
<-data.frame(name=c("o3","no","no2"),expression=c("quote(O[3])","quote(NO)","quote(NO[2])"))
for (mol in c(5,7,9)) {
plot(x, y, type="b",
2000 Feb 02
1
Outer margin (oma) settings for pairs()
...=
par("font.main"),
cex.main = par("cex.main"), oma=NULL, ...)
(i. e. add the named parameter oma)
----------------------------------------------------------------
(2) Replace lines 16-19, i. e.
oma <- c(4, 4, 4, 4)
if (!is.null(main))
oma[3] <- 6
opar <- par(mfrow = c(nc, nc), mar = rep(0.5, 4), oma = oma)
with the following:
if(is.null(oma)){
oma <- c(4, 4, 4, 4)
if (!is.null(main))
oma[3] <- 6}
opar <- par(mfrow = c(nc, nc), mar = rep(0.5, 4), oma = oma)
------------------------------------------------------...
2006 Nov 30
1
strange error from R CMD check about xaxp
...blem that the randomForest package that I
maintain has been failing checks in R-devel. However, I just can't see
why or where it's failing. I'd very much appreciate any pointer.
The failure occur when running the example code in varImpPlot.Rd:
> varImpPlot(mtcars.rf)
Error in par(opar) : invalid value specified for graphical parameter
"xaxp"
Execution halted
However, I do not have "par(opar)" or set xaxp anywhere in any of the
.Rd or .R files in the package. In varImpPlot(), I used the construct:
if (nmeas > 1) {
op <- par(mfrow=c(1, 2),...
2001 Nov 30
1
mosaic.by(): vectorizing args passed by apply()?
...stop("invalid table `table'")
if(length(by)>1)
stop("Sorry, cannot handle >1 by variable yet.")
np <- dim(table)[by]
name <- names(dimnames(table))[by]
titles <- paste(name, ":", dimnames(table)[[by]])
opar <- par( mfrow=c(np, np), usr=c(1,1000,1,1000), mar=rep(1/2,4))
on.exit(par(opar))
apply(table, by, mosaicplot, main=titles, shade=T, legend=F, ...)
}
thx,
-Michael
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http:/...
2001 Jan 10
1
Auto Demonstration...
Dear List,
Suppose I want to do a demonstration with R, which I will be showing a couple of different graphs (e.g. demo(graphics) ). However I want R to run through each graphics automatically. I can achieve this by changing the line in demo(graphics):
opar <- par(ask = interactive() &&
(.Device %in% c("X11", "GTK", "windows", "Macintosh")))
to
opar <- par(ask = FALSE &&
(.Device %in% c("X11", "GTK", "windows", "Macintosh")...
2006 Dec 28
2
Plot window - save as Postscript question
...a squared window (as all r-plots)
Not all subtitles are visible, but all subtitle will appear, when
changing the aspect ratio of the plot window with the mouse to a wide
format.
But does not work when using the save as postscript menu item from the
plot window.
is there any solution for that?
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
mp <- barplot2(VADeaths) # default
mp <- barplot2(VADeaths) # default
mp <- barplot2(VADeaths) # default
mp <- barplot2(VADeaths) # default
par(opar)
Regards Knut
2007 Aug 31
1
Question on shardsplot
Dear All,
Would you please tell me how to display the sample No. on the map ?
---Below commands don't display the sample No.(from 1 to 150).---
library(som)
library(klaR)
iris.som3 <- som(iris[,1:4], xdim = 14,ydim = 6)
library(klaR); opar<- par(xpd = NA)
shardsplot(iris.som3, data.or = iris,label = TRUE)
legend(3.5,14.3, col = rainbow(3), xjust =0.5, yjust = 0,legend =
levels(iris[, 5]),pch = 16, horiz = TRUE)
par(opar)
----------------
Ebi
[[alternative HTML version deleted]]
2011 Jan 11
1
Alphabetic labels on multi-plot graphics
Is there a way to achieve
lbl=c("a", "b", "c", "d")
par(mfrow=c(2,2), ann=FALSE)
for (t in 1:4){
plot(seq(from=1,to=2*pi,length=100),
sin(t*seq(from=1,to=2*pi,length=100)), type="l")
title(main=paste("(", lbl[t], ")", sep=""))
}
without having to use an object like 'lbl'?
More generally: is it possible
2008 Oct 31
0
R help for invoking nmmin()
...+= tmp->tempX[j][i] * betaFn[i];
}
total += pow(tmp->tempY[j] - temp,2);
}
return total;
}
void mgr(int, double *, double *, void *){}
int main()
{
//cout<<pchisq(2,7,1,0)<<endl;
//cout << qnorm(0.7, 0.0, 1.0, 0, 0) << endl;
int n = 5;
double *dpar, *opar;
int fncount, fail;
dpar = new double [n];
opar = new double [n];
dpar[0] = 13.67318;
dpar[1] = 0;
dpar[2] = 17.02707;
dpar[3] = 0;
dpar[4] = 24.08231;
double value;
double abstol = 1e-16;
double intol = 1e-8;
int y = 12;
MM t = (MM)malloc(y*(n+2)*sizeof(TT));
t-> tempX = new dou...
2009 Mar 20
1
Howto Supress Extra Blank Page in gridBase
...using "gridBase" like this.
The problem occurs whenever I execute this code
there is always a blank page created before the actual plot.
How can we disable that blank page?
I am using: R version 2.7.2 (2008-08-25)
and gridBase version: 0.4-3
__ BEGIN__
library(grid)
library(gridBase)
opar <- par(no.readonly=TRUE)
par(opar)
grid.newpage()
pushViewport(viewport(width=0.5, height=0.5))
grid.rect(gp=gpar(col="grey", lty="dashed"))
par(omi=gridOMI())
par(mfrow=c(2, 2), mfg=c(1, 1), mar=c(3, 3, 1, 0))
for (i in 1:4) {
plot(1:10)
}
__ END__
- Gundala Viswanath
Jaka...
1997 Aug 04
0
R-alpha: `axes' argument for barplot()
...15:58:44 1997
--- src/library/base/funs/barplot Sat Aug 2 16:00:22 1997
***************
*** 1,7 ****
"barplot" <-
function (height, names.arg, col=NULL, border=par("fg"),
beside=FALSE, space=0.2, legend.text,
! main=NULL, xlab=NULL, ylab=NULL, xlim, ylim, ...)
{
opar <- par(yaxs="i", xpd=TRUE)
on.exit(par(opar))
--- 1,7 ----
"barplot" <-
function (height, names.arg, col=NULL, border=par("fg"),
beside=FALSE, space=0.2, legend.text,
! main=NULL, xlab=NULL, ylab=NULL, xlim, ylim, axes = TRUE, ...)
{
opar <- pa...
2001 Sep 08
0
barplot forces xpd=TRUE (PR#1088)
...xlim = NULL, ylim = NULL,
axes = TRUE, axisnames = TRUE, inside = TRUE, plot = TRUE, ...)
{
if (!missing(inside)) .NotYetUsed("inside", error = FALSE)
***************
*** 61,68 ****
w.m <- matrix(w.m, nc = NC)
if(plot) { ##-------- Plotting :
opar <-
! if (horiz) par(xaxs = "i", xpd=xpd)
! else par(yaxs = "i", xpd=xpd)
on.exit(par(opar))
plot.new()
--- 61,68 ----
w.m <- matrix(w.m, nc = NC)
if(plot) { ##-------- Plotting :
opar <-
! if (...
2002 Feb 11
2
demo(graphics) problem under rw1041 (PR#1307)
I just downloaded rw1041 (the latest windows binary). Everything installed
fine.
When I start a new Rgui, and type "demo(graphics)", after pressing
return to start, a graphics window appears. When I get to the second
prompt:
> opar <- c(opar, par(bg = "white"))
> plot(x, ann = FALSE, type = "n")
Hit <Return> to see next plot:
at this point, the cursor is an hourglass and just waits -- nothing is
drawn into the graphics window. This is repeatable on both a Win 98
and Win 2000 ME setup.
H...