Displaying 20 results from an estimated 1000 matches similar to: "density plot text"
2006 Sep 11
1
graphics: y limit on xyplot
I would like to set the y axis limit of an xyplot using the object 'ylimit',
but receive this error:
[1] 990
Error in extend.limits(limitlist[[i]], axs = axs) :
improper length of lim
I get the same error if I use ylim.
library(lattice)
trellis.device(col = FALSE, theme = lattice.getOption("col.whitebg"))
name <- "Variable name"
symbols <-
2005 Nov 11
3
problems with for: warnings and segfault
Hi,
I have two problem with a for looping using R Version 2.1.1 (2005-06-20) on a
Debian Linux Testing.
The first problem: warnings messages
Look:
> xcoord <- 5
> ycoord <- 5
> indice <- 1
> for(i in c(1:5)) {indice <- indice+1;xcoord[indice] <- xcoord+i;
ycoord[indice] <- ycoord }
Warning messages:
1: number of items to replace is not a multiple of replacement
2008 Dec 15
1
Semi-random movement inside a circle
Dear list,
I am trying to program semi-random movement within a circle, with no particles leaving the circle. I would like them to bounce back when they come to close to the wall, but I don't seem to be able to get this right. Would somebody kindly give me a hint ? This is my code so far, the particle starts at some point and moves towards the wall, but I don't get the "bouncing
2008 Dec 15
1
Movement within a circle
Dear list,
?
I am trying to program semi-random movement within a circle, with no particles leaving the circle. I would like them to bounce back when they come to close to the wall, but?I don't seem to be able to get this right. ?Would somebody?be able to?give me a hint ? This is my code so far, the particle starts at some point and moves towards the wall, but I don't get the
2009 Oct 28
2
Re ading and Creating Shape Files
Hello R Community,
I have imported a dataset which contain X Y coordinates and would like to
recreate a shape file after some data analysis. What i have done is to
import some taxlot data and join them based on some criteria. I want to
check to see how well the joining went by reviewing the results in GIS.
A couple things. I cant seem to import a shape file correctly using the
maptools
2006 Sep 07
3
graphics - joining repeated measures with a line
I would like to join repeated measures for patients across two visits using
a line. The program below uses symbols to represent each patient. Basically,
I would like to join each pair of symbols.
library(lattice)
patient <- c(1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9)
var <-
c(826,119,168,90,572,323,122,10,42,900,250,180,120,650,400,130,12,33)
visit <- c(1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2)
2006 Sep 07
2
merging tables by columns AND rows
Hi everyone!
I have 100 tables of the form:
XCOORD,YCOORD,OBSERVATION
27.47500,42.52641,177
27.48788,42.52641,177
27.50075,42.52641,179
27.51362,42.52641,178
27.52650,42.52641,180
27.53937,42.52641,178
27.55225,42.52641,181
27.56512,42.52641,177
27.57800,42.52641,181
27.59087,42.52641,181
27.60375,42.52641,180
27.61662,42.52641,181
..., ..., ...
with approximately 1000000 observations for each.
2007 May 30
2
control axis
I have an outlier that I would still like to display, but would prefer to
shorten the axis. For example, display 0% - 40%, and 90% - 100%. Is this
possible? I am using an xyplot.
Thanks
Murray
--
Murray Pung
Statistician, Datapharm Australia Pty Ltd
0404 273 283
[[alternative HTML version deleted]]
2008 Dec 11
2
call lattice function in a function passing "groups" argument
I'm trying to use a lattice function within a function and have problems
passing the "groups" argument properly. Let's say I have a data frame
d <- data.frame(x = rnorm(100), y = c("a", "b"))
and want to plot variable x in a densityplot, grouped by the variable y, then
I would do something like
densityplot(~ x, d, groups = y)
If however I wanted to
2010 Dec 15
1
Problems drawing a colored 'rug' in the Lattice 'densityplot'
Hi All,
I'm trying to add a 'rug' representation of my data to a plot created
with densityplot(). While I can do this in the simple case, I can't do
it properly when I include the "groups" argument. I have an example
below. I am running a reasonably new version of R.
print(sessionInfo())
R version 2.12.0 Patched (2010-11-07 r53537)
Platform: i686-pc-linux-gnu
2012 Feb 22
2
Several densityplots in single figure
Hi,
I have created two separate overlapping density plots- see example code
below.
What I wish now to do is combine them into one figure where they sit side
by side.
Any help would be great!
many thanks in advance, josh.
#####################
thedataA <- data.frame(x1=rnorm(100,1,1),x2=rnorm(100,3,1)) #create data
thedataA.m<-melt(thedataA)
densityplot(~value, thedataA.m,
2006 Jun 26
1
How to generate a figure using par( ) with some densityplot( )'s
Hi Dear R users,
For a pair plotting, usaully we use par( ) function. Apparently it does not work anywhere. I want to have 3 plots in a single figure, like this:
par(mfrow=c(3,1))
densityplot( a)
densityplot(b)
densityplot(c)
But it does not work. How is it possible to have such a figure with densityplot( ) in a single figure?
So many thanks for any help.
Amir Safari
2007 Aug 21
1
small issue with densityplot
Hi folks,
This is really minor but to someone not familiar with the various tentacles of the lmer package it could be really annoying. I was trying to plot the posterior density of the fixed effect parameters of a lmer model,
> hr.mcmc = mcmcsamp(hr.lmer, n=50000)
> densityplot(hr.mcmc, plot.points=F)
There is this error,
"Error in densityplot(hr.mcmc, plot.points = F) :
no
2008 Aug 26
2
awkward behavior with densityplot function
Hi,
I have the following script:
---- t.R ---
grafica <- function() {
v <- read.csv('preprocessed/komolongma.ece.uprm.edu.active',sep=',')
x <- as.ts(v$active)
bitmap(file="output.png")
densityplot(~x,col='blue',main='Density Plot')
dev.off()
}
grafica()
---- t.R ---
When I "sourced" it from R prompt, it quietly runs.
2012 Apr 11
1
Lattice densityplot with semitransparent filled regions
Hello,
I'm doing some graphics for a paper and a need customize such with filled
region above the density curve. My attempts I get something very near what
I need, but I don't solve the problem of use semitransparent filled. Below
a minimal reproducible code. Someone has any idea?
require(lattice)
# toy data...
dt <- expand.grid(A=1:2, B=1:3, y=1:50)
dt$y <- rnorm(nrow(dt), dt$B,
2011 Jul 27
1
How to adjust y-axis when using panel.densityplot within histogram function
Hi
I would like to superimpose group-specific densityplots on top of an overall
histogram using panel.histogram and panel.densityplot. Furthermore, I would
like to automatically adjust the range of the y-axis to take into account
the ranges of both histogram and densityplot. This last part is where I have
a problem. I believe using the prepanel argument of histogram is typically
the way to go,
2008 Mar 10
2
Multiple density plots
Hi all,
I'm interested in doing a multiple density plot on a number of columns in a
dataframe.
>DF
lineA.1 lineA.2 lineB.1 lineB.2
r1 5.355354 6.665575 10.288498 11.74750
r2 3.643415 5.427600 11.407112 13.97065
r3 5.813674 6.438502 9.628871 11.57456
r4 5.241340 5.125049 10.456221 12.35381
r5 4.640885 8.635518 8.344704 11.98484
r6 4.559852 6.416171 10.419599 10.89247
r7
2008 Jun 26
2
density and jpeg
Dear R community, I am using densityplot (lattice package) for a large
dataset and wish to print it to a jpeg (the pdf is huge). R crashes
consistently. Am I doing it wrong or is densityplot incompatible with jpeg?
I work on a Mac, R 2.7.0.
> require(lattice)
> jpeg("test.jpeg")
> d[1:10]
[1] 0.700218 0.700175 0.700357 0.700847 0.698286 0.701520 0.698158 0.699300
0.698819
2001 Feb 22
1
Graphical parameters in perspective plot
Hello,
I've a problem for setting graphical parameters in perspective plot
(function persp).
I wonder if it's possible to add some text (function text) on an
existing persp plot USING the axis coordinates.
In fact I want to add some text on a persp plot according to x
coordinates.
I've tried to use text(xcoord,ycoord, label="toto") but the toto text
doesn't appear at
2006 Dec 01
3
Vertical line in densityplot?
Hi all,
I'm trying to get a vertical line at a specific point in a
densityplot. abline seems to be what's required, but it doesn't align
itself to the scale used in the plot.
example:
library(lattice)
x<-rnorm(100)
plot.new()
densityplot(x)
abline(v=0)
-----
The line seems to use some other coordinate system. What kind of call
do I use to make abline use the graph's