Displaying 20 results from an estimated 900 matches similar to: "customizing color key with plot3D"
2017 Jun 21
0
customizing color key with plot3D
Karline,
Thank you for your help. I discovered that in addition to including clim, I needed to omit breaks. This code uses one of your other examples as a starting point and works as intended:
persp3D(z = volcano, zlim = c(-60, 200), phi = 20,
colkey = list(length = 0.2, width = 0.4, shift = 0.15,
cex.axis = 0.8, cex.clab = 0.85), lighting = TRUE, lphi = 90,
clab =
2017 Jun 29
0
plot3D color ramp not working as expected
Hi, I want to use a discrete color ramp with plot3D, and show NA values as white (default). I get unexpected results per the following.
# as in help(slice3D) example:
par(mfrow = c(2,2))
x <- y <- z <- seq(-1, 1, by = 0.1)
grid <- mesh(x, y, z)
colvar <- with(grid, x*exp(-x^2 - y^2 - z^2))
slice3D (x, y, z, colvar = colvar, theta = 60)
#
# use three discrete classes and colors
2015 Nov 23
2
Dibujar en tres dimensiones para un dominio dado. Añadir curvas de nivel.
Hola,
Deseo dibujar en tres dimensiones la siguiente función
z= min( 1 - abs(x-0.7), 1 - abs(y-0.2))
en este dominio 0<= x <= y <=1
En el ejemplo que hay abajo, se dibuja para 0<=x<=1, 0<=y<=1. ¿Me pueden ofrecer alguna ayudita para dibujarla en el recinto 0<= x <= y <=1 ?
Y si además me indican cómo dibujar las proyecciones (curvas de nivel) en los planos XY, YZ y
2009 Apr 28
1
image3d in misc3d
Hi,
I'm trying to make sense of the image3d plots in misc3d. Unfortunately I can't find any authors on the help pages of the function to e-mail directly. In the following toy example, I'm puzzled as to why (1) the positions of the image plot on the axes include negative values when I think I've specified all to be 1:3 and (2) the logic that needs to be adhered to in order to
2000 Dec 22
0
par(lab= *) / axis(*) bug (PR#791)
As the subject says,
here is example code (with comments) showing the problem:
p1 <- function(lab = c(8,12,7))
{
## This `fails' (on a virgin device)
clab <- paste(lab,collapse=",")
plot(1,1, xlim = c(0,15), ylim = c(-.8,1), type ="n", axes = FALSE,
main=paste("plot(*,axes=F); par(lab= c(",clab,")); axis(*) x
1997 Jul 28
0
R-alpha: R 0.50.a1: small patches for graphics and image demo
Applying the following patches closes the following task (part 1 was
already taken care of).
TASK: New Problems
STATUS: Open
FROM: <Kurt.Hornik@ci.tuwien.ac.at>
New minor remarks:
* The documentation for `image' still has the old order z, x, y.
* Perhaps one should add `par(ask = T)' in the image demo?
* Perhaps one should save the original value
2009 Jun 02
0
quantmod plot trendline
Hi,
Is there a way to plot trendline with quantmod package?
There is addLines function in the package but I can't seem to figure out how
to use it (not well documented):
> args(addLines)
function (x, h, v, on = 1, overlay = TRUE, col = "blue")
NULL
so arguments "h" and "v" add horizontal and vertical lines. How does
argument "x" work? I would like
2010 Mar 09
0
plotlmer graphics/x-axis and legend options
Hi,
I am Using R.2.9.2 and I am trying to make nicer some graphics, which
are constructed with plotmer.fnc. In particular, I have two questions:
1. Is is a way to decide in which order we want the labels on the
x-axis. For now, the reference value label is the first one, and the
other labels appear in the alphabetical order. I would like them to be
sorted in the ascending way. Here is my
2011 Mar 02
1
pb with Date format using filled.contour
Hi R-help community,
Can anyone tell me why, while using :
x <- seq(as.Date("2001-01-01"),as.Date("2001-01-01") +
nrow(volcano)-1,1)
y <- seq(1, ncol(volcano),1)
when I plot the volcano matrix with that command :
filled.contour(x,y,volcano)
the graph has a Date format on X-axis, ok ...
... but when adding a contour plot to the filled contour, using this
2010 Jan 04
2
Adding a distance scale to a plot?
Do you know what steps I need to take to add a scale to a plot?
I'm pulling my example out of "An Introduction to R: Software for StatisticalModelling & Computing" (see the R code around Figure 76).
I would like to add a scale to the image produced by the following code.? I would like to the scale to list the distance?and units:?
data(volcano)
x <- 10*(1:nrow(volcano))
y
2009 Sep 05
8
Color index in image function
Dear All,
I was looking for the color index in?image function,?such as from topo.colors(n) and etc. but still never found it. For instance, from the help menu.
###########################################
# Volcano data visualized as matrix. Need to transpose and flip
# matrix horizontally.
image(t(volcano)[ncol(volcano):1,])
# A prettier display of the volcano
x <- 10*(1:nrow(volcano))
y
2009 Mar 03
1
behavior of squishplot in TeachingDemos
Hi list,
I wonder if anyone has had this experience with squishplot() in the TeachingDemos package.
Taking the example from the ?image help page,
library(TeachingDemos)
x <- 10*(1:nrow(volcano))
y <- 10*(1:ncol(volcano))
layout(matrix(c(1,2,3,4),ncol=2,byrow=TRUE),height=c(2,1))
## 1st plot
op <- squishplot(range(x),range(y),1)
image(x, y, volcano, col = terrain.colors(100))
par(op)
2003 Aug 01
1
shading in image()
Is there a way to make a shading interpolation on an image plot?
Something similar to matlab 'shading interp', I think it is called Gouraud
shading.
What I want is to make a image plot look nicer. with image() it looks very
facetted, and I would like to make it look smoother.
I've tried with interp.surface() in fields package but it (obviously) makes
nan values at the borders and
2013 Apr 12
1
support for POSIXct classes in image.default axes
Hello, I would like to suggest the following change to image.default in
src\library\graphics\R\image.R:
98c98
< plot(NA, NA, xlim = xlim, ylim = ylim, type = "n", xaxs = xaxs,
---
> plot(x[1], y[1], xlim = xlim, ylim = ylim, type = "n", xaxs = xaxs,
This provides all the support of axis.POSIXt that plot.default gives,
currently the default new plot in
2009 Feb 06
2
undesired grid in ps/eps outputs generated by filled.contour or image
Hi!
Whenever I save a graphic in ps/eps format generated by filled.contour or
image, an undesired grid is added to it (not visible on the X11 screen). For
example:
postscript("volcano.eps")
filled.contour(volcano,col=gray(seq(0,1,,50)),levels=seq(min(volcano),max(volcano),,50))
dev.off()
Any ideia how to eliminate this grid?
Thanks,
Rachel
[[alternative HTML version deleted]]
2011 Aug 26
0
Problem in calling R functions from Matlab
Hi,
I wish to use R (version 2.13.1)?from within Matlab(ver R2009a) on windows XP plaform (on both 64 bit and 32 bit OS) . For this I have installed StatConnector (http://rcom.univie.ac.at/download/current/statconnDCOM.latest.exe) for calling R from within Matlab (R2009a) on Windows XP platform. I have added all the files of MATLAB_RLINK folder (downloaded from
1997 Apr 17
2
R-alpha: R-0.50.b6: bug in graphics demo
The line
contour(volcano, x, y, l, col = "yellow", lty = "solid", add = TRUE)
needs to be changed to
contour(x, y, volcano, col = "yellow", lty = "solid", add = TRUE)
A patch is appended below.
-k
*** demos/graphics/graphics.orig Thu Apr 17 11:02:39 1997
--- demos/graphics/graphics Thu Apr 17 11:03:08 1997
*************** plot(numeric(0), numeric(0),
2013 Sep 22
0
colores
Por favor ver comentario con las las letras mayúsculas
data("CPS1985", package = "AER")
cps <- CPS1985
cps [1:10,]
dim( cps)
names( cps)
library("quantreg")
#regresion usual
cps_lm <- lm(log(wage) ~ experience + I(experience^2) +
+ education, data = cps)
#regresion por quantiles, tau son los cuantiles
2011 Mar 29
1
Dirichlet surface
Dear list members,
I want to draw surfaces of Dirichlet distributions with different
parameter settings.
My code is the following:
#<begin code>
a1 <- a2 <- a3 <- 2
#a2 <- .5
#a3 <- .5
x1 <- x2 <- seq(0.01, .99, by=.01)
f <- function(x1, x2){
term1 <- gamma(a1+a2+a3)/(gamma(a1)*gamma(a2)*gamma(a3))
term2 <- x1^(a1-1)*x2^(a2-1)*(1-x1-x2)^(a3-1)
1997 Jun 16
0
R-alpha: image(): minor bug in R code and helpfile (fixes)
I've noticed a few minor annoyances/mismatches with S in image().
First, if you give it just a matrix argument (image(z)), it complains
rather than (as S does) using default x and y.
This patch fixes it to work (mostly) like S (although in keeping with
what was in R already the default x,y coordinates are ((0,1),(0,1)) rather
than (1:nrow,1:ncol)).
5,16d4
< if(is.list(x)) {