similar to: How to get the scale limits in lattice plot

Displaying 20 results from an estimated 10000 matches similar to: "How to get the scale limits in lattice plot"

2010 Jan 24
1
lattice ltext
Dear friends - please give me a hand. I have a dataset of 40 patients in two groups observed on three occasions. I only want to plot a line for each patient in the two groups. I use the ltext function to put the patient number but fail to make lattice understand the numbers as unique since apparently it starts all over with 1:20 for each panel instead of respecting my desires to have 1:20
2011 Jan 21
1
Help for lattice. par(new=TRUE)
Hi list, I want to plot two plot in the same figure. I set par(new=TRUE). But it does not work. library(lattice) myPanel <- function(x,...) { panel.histogram(x,alpha=0.4,...) ltext(0.4,1.5,paste("Mean=","0.05",digit=2)),cex=0.8) ltext(0.8,1.5,paste("s.d.=","0.06",digit=2)),cex=0.8) } histogram(sh2,
2010 Apr 01
2
pdf files in loops
I need to make a bunch of PDF files of histograms. I tried gatelist = unique(mdf$ArrivalGate) for( gate in gatelist) { outfile = paste("../", airport, "/", airport, "taxiHistogram", gate, ".pdf", sep="") pdf(file = outfile, width = 10, height=8, par(lwd=1)) title=paste("Taxi time for Arrival Gate", gate, "by
2010 Jan 28
1
hist - unevenly spaced bars
I am sure this is trivial, but I cannot solve it. I make a histogram. There are 5 categories "1",...,"5" and 80 values and the histogram does not evenly space the bars. Bars "1" and "2" have no space between them and the rest are evenly spaced. How can I get all bars evenly spaced? The code: > Q5 [1] "4" "4" "4"
2010 Jan 03
3
Thin bars in R hist !!??
Hi, I am trying to plot a histogram with my dataset that has 68 elements, 67 of which are zero and the last one is 18. It can be reproduced as follows: x<-array(0, dim=(68)) x[1] = 18 I am trying to plot its histogram using: hist(x, breaks=10, xlim=c(0, 100), axes=F) axis(2, at=seq(0, 70, 5)) # for the y-axis axis(1, at=seq(0, 100, 10)) # for the x-axis As you would also see if you
2009 Dec 26
1
Why do histogram bars vary their width?
histogram(~(Arrival4) | as.factor(Hour), type="count", breaks=16,ylab="Arrival Count", xlab="Arrival Rate/4",main="Friday EWR A22R D22L Configiration", layout=c(6,4), par.strip.text=list(cex=0.7)) Why do I get plots with different bar widths? See attached. Thanks, Jim Rome -------------- next part -------------- A non-text attachment was scrubbed...
2010 Jan 03
6
Help with function "fitdistr" in "MASS"
Hi, R users: I want to fit my data into a normal distribution by using the command "fitdistr" in "MASS". I changed my data class from "ts" to "numeric" by >class(mydata)="numeric" but after using "fitdistr", I got the result below >fitdistr(mydata,"normal") mean sd NA NA (NA) (NA) the help doc of
2002 Apr 23
1
Writing text in lattice graphics
I'm trying to obtain a set of regression lines obtained for different values of a factor using lattice. I would like to add a string to each panel showing the R^2 value of the respective line, but I'm having difficulties positioning the text (namely on which coordinates to give to the "ltext" function). Here is what I'm using (I've used ?? for the things I would like
2007 Dec 09
1
Saving lattice plot as a PDF
Hi there, I need to save a series of lattice plots as a PDF, this is my code so far: windows(height=8,width=6) plot.new() library('grid') lattice.options(layout.heights=list(top.padding=list(x=0.15, units="inches"))) print(plot1, split=c(1,1,2,3), more=TRUE) print(plot2, split=c(1,2,2,3), more=TRUE) print(plot3, split=c(1,3,2,3), more=TRUE) print(plot4, split=c(2,1,2,3),
2009 Nov 26
1
Adding text in the panels for Trellis plot ...
i was trying to do a for loop for plotting the histograms , but it doesnt work properly > library(lattice) > columns <- 8:153 > plots <- vector("list", length(columns)) > j <- 0 > for (i in columns) + { + plots[[ j <- j+1 ]] <- histogram( ~ data[,i] | data[,2],ylab = "Frequency", + xlab = "Score", xlim = c(1,5), ylim =
2005 Feb 15
1
lattice multiple plots per page
Dear R-sters, I was wondering if anyone has encountered the following issues. I've figured out how to get multiple levelplots [library(lattice)] on a single plot. However, when I add text (adding axis labels for the entire four panel plot) the text is missing when I insert the *.eps file I've created into my LaTeX document (via MikTeX-WinEdt). And, I've just upgraded to R
2004 Apr 13
1
lattice problem in R-1.9.0
Hi all, I just installed R-1.9.0 on Windows 2000 from binaries. Yesterday, on R-1.8.1 I ran a script that looked like: library(lattice) tmp <- expand.grid(A = 1:3, B = letters[1:2]) tmp$z <- runif(NROW(tmp)) trellis.device(png, file = "x1081.png", theme = col.whitebg) xyplot(z ~ A | B, data = tmp, panel = function(x, y, i) { panel.xyplot(x, y)
2009 Dec 24
4
How to separate a data set by its factors
I have a large data set of airport data and wish to analyze it by hour and day of the week. hour and day of the week are factors. I can do something such as: histogram(~(Arrival.Val) | DAY*Hour, type="count", breaks=60) which displays the data the way I want it in principle, but the plots are too small to read. I added layout=c(7,6,4) to the argument list, but then I only get the first
2003 Oct 27
1
How can strheight be calculated in lattice/grid?
If I have drawn a string with ``ltext( x, y, labels="first string" )'' how can a draw a second string just one line (or strheight("X") below the first string regardless of the size and scales of the panel? Thanks Wolfram
2009 Nov 23
3
Trellis Plot
anyone know how to add text in the Trellis plot panel ?? i want to add things eg: dot dot dot. in the headrer of the panel. eg: http://old.nabble.com/file/p26486579/hist1.png hist1.png -- View this message in context: http://old.nabble.com/Trellis-Plot-tp26486579p26486579.html Sent from the R help mailing list archive at Nabble.com.
2010 Apr 16
2
how to change the position of xlab in truehist?
Hi, I'm wondering how can I change the position of xlab in truehist. For example, the following code creats a histogram with 4 bins for my discrete data. I want each bin to be labelled as 0, 1, 2, or 3 in the middle, so that it's clear each bin corresponds to each of the discrete case. I was thinking of first delete xlab and then add marks myself, but it doesn't look like it's
2009 Dec 31
0
How to annotate lattice plots
I am creating a lattice plot with with(ordgdp, xyplot(delivery~AAR | GDP_ID, xlab="AAR", ylab="Actual Arrival Rate")) which works, and gives me 48 plots, one for each GDP_ID. But I would like to put the number of hours that each GDP lasted on the relevant plot. This is given by the following table: >gdphrs GDP_ID 21273 21288 21293 21294 21297 21303 21361 21399 21415 21436
2009 Oct 30
1
insert a text in panels, always in the same position (lattice, ltext, ?prepanel?)
Dear R-users, my present problem is related to lattice. I would like to put some text in each panel, namely a p-value. I therefore wrote a simple panel function as reported here below. I'm able to write the value in each panel at the maximum value of y for each panel, but this obviously overlay the text to the points. What I'm looking for is to write the text always in the same
2010 Jan 06
1
xyplot: adjusting the scale (min, max & tick)
Hi, I'm terribly sorry but it seems it cannot figure this one out by myself so, please, if somebody could help I would be very grateful. So, when I plot with xyplot() I get an y-axis that is very ugly... starting from a random number and having so many ticks that it becomes unreadable. How do I tell xyplot how to draw the axis? E.g., start from 100, end at 200 with 25 units between
2010 Jan 18
3
Using the output of strsplit
I successfully combined my data frames, and am now on my next hurdle. I had combined the data and quarter, and used tapply to count the entries for each unique date/quarter pair. ar= tapply(ewrgnd$gw, list(ewrgnd$dq), sum) #for each date/quarter combination sums the gw (which are all 1) dq=row.names(ar) spl=strsplit(dq) But I need to split them back into the separate date and quarter. So I used