Displaying 20 results from an estimated 8000 matches similar to: "X11 device"
2006 Mar 04
5
Remove "gray grid" from levelplot
Hi,
If I use the levelplot function of the lattice library, I always see
small "squares" in the plot. They indicate the region for which the
same color is used. If you have a levelplot of a function which is
evaluated at 25x25 equally-spaced points you obtain 26 squares in x
and 26 squares in y direction. That does not bother too much (but
still bothers somehow...), but if you
2006 Feb 05
1
wireframe zlim option
Hello,
I would like to plot a wireframe of a function which is defined on the
unit square using the lattice library (for trellis-like plots). The plot
contains z-values of about 100 (only in the neighborhood of zero) although
most of the z-values are in the range of -let's say- 0 to 10. If I
evaluate this function on an equidistant grid of 25 points on the unit
square the plot quality is not
2006 May 29
3
mtext in trellis-loop & colorkey
Hello,
I would like to create a sequence of plots (using a for loop). I read
in the FAQ that print() has to be used in order to obtain any output.
This works perfectly fine as long as I only consider one function
call in the loop, but I would like to add mtext() to the each plot in
the loop. Unfortunately, this did not work. Any suggestions?
As you can see from the provided example,
2011 Mar 03
1
lattice: How to increase space between ticks and labels of z-axis?
Dear expeRts,
How can I increase the space between the ticks and the labels in the wireframe plot
below? I tried some variations with par.settings=list(..) but it just didn't work.
Many thanks,
Marius
library(lattice)
u <- seq(0, 1, length.out=20)
grid <- expand.grid(x=u, y=u)
z <- apply(grid, 1, function(x) 1/(x[1]*x[2]+0.0001))
wireframe(z~grid[,1]*grid[,2], aspect=1,
2011 Mar 04
1
lattice: wireframe "eats up" points; how to make points on wireframe visible?
Dear expeRts,
I would like to add two points to a wireframe plot. The points have (x,y,z) coordinates
where z is determined to be on the wireframe [same z-value]. Now something strange
happens. One point is perfectly plotted, the other isn't shown at all. It only
appears if I move it upwards in z-direction by adding a positive number. So somehow
it disappears in the wireframe-surface
2006 Mar 04
1
Controlling (number of) wires in wireframe
Hi,
I would like to plot a wireframe (library: lattice) of the function f
(x,y)=x*y where x and y are equally evaluated between 0 and 1.
When one uses the option drape=TRUE then each "square" between the
"wires" (lines that build the surface shape) gets a certain color. A
perfect wireframe plot of a continuous surface would be, if you
(almost) can not distinguish
2006 Mar 04
1
Wireframe: Labels parallel to axes?
Hi,
I would like to have the labels parallel to the axes in my wireframe
(lattice) plot. Sure you can use ...xlab=list(label="x-axis",rot=30)
and for the z-axis this is easy (as rot=90), but for the x- and y-
axis the angle is not (always) quite clear (to me). Is there an
option that just rotates all three labels to be parallel to the
corresponding axes?
Thanks
marius
2015 Feb 03
2
Seed in 'parallel' vignette
Hi,
This is most likely only a minor technicality, but I saw the
following: On page 6 of the 'parallel' vignette
(http://stat.ethz.ch/R-manual/R-devel/library/parallel/doc/parallel.pdf),
the random-number generator "L'Ecuyer-CMRG" is said to have seed
"(x_n, x_{n-1}, x_{n-2}, y_n, y_{n-1}, y_{n-2})". However, in L'Ecuyer
et al. (2002), the seed is given with
2010 Dec 30
5
Why is format(10000, big.mark = "\\,") not 10\,000?
Hi,
why does format(10000, big.mark = "\\,") not give me "10\,000"? How can I get this kind of "big.mark"?
Cheers,
Marius
2011 Apr 06
7
Quiz: Who finds the nicest form of X_1^\prime?
Dear expeRts,
I would like to create a plotmath-label of the form X_1^\prime. Here is how to *not* do it [not nicely aligned symbols]:
plot(0,0,main=expression(italic(X*minute[1])))
plot(0,0,main=expression(italic(X[1]*minute)))
plot(0,0,main=expression(italic(X)[1]*minute))
Any suggestions?
Cheers,
Marius
2012 Dec 08
5
How to efficiently compare each row in a matrix with each row in another matrix?
Dear expeRts,
I have two matrices A and B. They have the same number of columns but possibly different number of rows. I would like to compare each row of A with each row of B and check whether all entries in a row of A are less than or equal to all entries in a row of B. Here is a minimal working example:
A <- rbind(matrix(1:4, ncol=2, byrow=TRUE), c(6, 2)) # (3, 2) matrix
B <-
2016 May 05
4
R process killed when allocating too large matrix (Mac OS X)
Hi Simon,
thanks for your quick reply.
1) ... so you can reproduce this?
2) Do you know a way how this can be 'foreseen'? We allocate larger
matrices in the copula package depending on the user's input
dimension. It would be good to tell her/him "Your dimension is quite
large. Be aware of killers in your neighborhood"... before the killer
attacks.
Thanks & cheers,
2012 Mar 01
2
How to colorize the panel backgrounds of pairs()?
Dear expeRts,
I would like to colorize the backgrounds of a pairs plot according to the respective panel number. Here is what I tried (without success):
count <- 0
mypanel <- function(x, y, ...){
count <<- count+1
bg. <- if(count %in% c(1,4,9,12)) "#FDFF65" else NA
points(x, y, cex=0.5, bg=bg)
}
U <- matrix(runif(4*500), ncol=4)
pairs(U, panel=mypanel)
I
2010 Dec 26
1
lattice splom: how to adjust space between tick marks and tick labels?
Dear expeRts,
how can I decrease the space between the tick marks and the corresponding labels in an splom?
See here:
library(lattice)
U <- matrix(runif(4000), ncol = 8)
splom(U, axis.text.cex = 0.2) # => space between the [small] tick labels and tick marks is/seems to be too large
I checked ?panel.pairs but could not find an option for that.
Cheers,
Marius
2014 Aug 22
3
parallel::detectCores(TRUE) gives: Error in system(cmd, TRUE) : error in running command
Hi,
Both under the current R-devel (r66456) and a version from about 3
months ago, I experience the following behavior:
> parallel::detectCores(TRUE)
Error in system(cmd, TRUE) : error in running command
> traceback()
3: system(cmd, TRUE)
2: gsub("^ +", "", system(cmd, TRUE)[1])
1: parallel::detectCores(TRUE)
>
This is on Ubuntu 14.04. Does anybody else see this? [I
2006 Aug 17
2
SaltedHashLoginGenerator no such file to load -- iconv
Hi,
I''m trying to use the SaltedHashLoginGenerator as documented on
http://wiki.rubyonrails.com/rails/pages/SaltedHashLoginGenerator
Ruby version: ruby 1.8.4 (2005-12-24) [i386-openbsd3.9]
I''ve the following commands:
gem install salted_login_generator
gem install localization_generator
rails myapp
cd myapp
ruby script/generate salted_login User Localization
All ran
2016 May 05
1
R process killed when allocating too large matrix (Mac OS X)
Hi,
Interesting "feature" in 10.11.4. I wonder if the process is killed
before or after malloc() returns. If before, it seems very blunt:
"You're asking too much and I don't like it so I kill you now".
If after it doesn't look much better: "You're asking a lot and I
don't like it but I give it to you anyway. I'll kill you quickly
later".
Why
2020 Mar 27
2
Expressions from boxplot() passed to bxp()
Hi,
Is this expected behavior (R-3.6.0)?
dat <- cbind(x = 1:10, y = 10:1)
ylab <- substitute(X[t], list(t = 2))
plot(dat, ylab = ylab) # works (correctly displays ylab)
boxplot(dat, ylab = ylab) # fails
boxplot(dat, ylab = as.expression(ylab)) # works
Thanks & cheers,
M
2010 Nov 13
3
How to set an argument such that a function treats it as missing?
Dear expeRts,
I would like to call a function f from a function g with or without an argument.
I use missing() to check if the argument is given. If it is not given, can I set
it to anything such that the following function call (to f) behaves as if the argument
isn't given? It's probably best described by a minimal example (see below).
The reason why I want to do this is, that I do
2011 Apr 18
4
splom, plotmath: how to add three lines of information with alignment?
Dear expeRts,
I would like to create a scatter plot matrix with splom(). The lower panel should
contain some additional information about the samples shown in the upper panel
plot, see the splom() call below. Now two questions came up:
(1) The lower panels show "tau" and "alpha" on top of each other. How can I plot
*three* expressions on top of each other? I tried several