similar to: Creating mixed line and point graphs with xyplot

Displaying 20 results from an estimated 10000 matches similar to: "Creating mixed line and point graphs with xyplot"

2012 Nov 19
3
Plot Area Dimensions
Dear colleagues, I wish to create a figure with 6 plots arranged vertically with no spacing between them as they all have a common x-axis. However, using the code below I'm unable to get the plot area the same size for each plot. The bottom plot with the x-axis label is smaller than the others, as is the top plot which has larger margins. How can I get the plot region the same size for
2008 Jul 01
2
Graph Order in xyplot
I have constructed a Trellis style xyplot. lengthf <- factor(length) xyplot(SLI$velocity ~ SLI$width | SLI$lengthf, layout = c(2,7), xlab = "Width (cm)", ylab = "Velocity (m/s^2)", col = "black") This produces a lovely little plot. However, the grouping factor(lengthf) isn't in the right order. My values range from 2-28 and the 2 graph on the bottom left and
2008 Jan 25
1
Poisson Maximum Likelihood Estimation
Hi I am trying to carry out some maximum likelihood estimation and I'm not making much headway, and I'm hoping that someone will be able to point me in the right direction. I am modelling mortality statistics. One way to do this is to model the mortality rate (or, more accurately, log of the mortality rate, log_m) as (say) a constant plus a proportion of age, plus time, so: r_1 <-
2009 Dec 04
1
Apparent different in symbol scaling between xyplot and grid.points
Dear R-users, For the past few days, I have been trying to find the reason why some of my plots were showing symbols of different sizes, while I thought I was using the same .cex arguments everywhere. The problem is exemplified by the following example code where the xyplot and grid.points functions are used. The scaling factor is set to 0.84 in both the functions settings, but one can see
2004 Jul 16
1
highlighting subset of point with xyplot (or Hmisc(xYplot))
Hello all, I am trying to use xyplot to give a six panel plot and to highlight only points (in any panel) that meet a certain criterion. With the plot command I would do something like: plot.default(filein$Site,filein$circ.conc) points(filein$Site,filein$circ.conc,type="p", pch=ifelse(filein$p.value<5e-02,19,21)) I had thought I could just stick in the pch line from above into
2010 Aug 21
1
lattice::xyplot() with one factor for points and another for lines
Hi: In lattice, how does one handle separate graphical behavior for two different factors? In the xyplot below, the objective is to use the levels of one factor to distinguish corresponding shapes and colors, and the levels of the other factor to perform level-wise loess smooths. # Illustrative data: d <- data.frame(time = rep(1:8, each = 6), val = rnorm(48), gp1 =
2010 Oct 09
1
point characters THICKER in xyplot()
Hi, how can I make the point characters thicker (NOT larger) in xyplot when groups= argument is used? dat<-data.frame(x=1:100,y=1:100,group=rep(LETTERS[1:5],each=20)) ### lwd=2 doesn't work here xyplot(y~x,groups=group,data=dat,col=1:4,pch=1:4,lwd=2) ### lwd=2 works with panel.points(), but grouping is messed up! xyplot(y~x,groups=group,data=dat,col=1:4,pch=1:4,
2009 Jan 21
1
Can I add a point to a pointsGrob from an xyplot without redrawing ?
Hi: I am a newbie using grid and lattice. I want to update a xyplot without redrawing and I was wondering if there is a way of adding a point to a pointsGrob ? For example, take the example from the "R Graphics Book" page 218-219: grid.newpage() angle <- seq(0, 2*pi, length=21)[-21] x <- cos(angle) y <- sin(angle) xyplot( y ~ x, aspect = 1) Lets say I take the pointsGrob
2009 May 14
2
assign unique size of point in xyplot
Hello,I am using xyplot to try and create a conditional plot. Below is a toy example of the type of data I am working with slevel <- rep(rep(c(0.5,0.9), each=2, times=2), times=2) tlevel <- rep(rep(c(0.5,0.9), each=4), times=2) noutliers <- rep(rep(c(2,4), times=4), times=2) analysis <- as.factor(rep(c('uv', 'mv'), each=8)) cp <-
2009 Sep 26
1
Mixed font in lattice xyplot lables
Hi all, can anyone suggest a reason as mto why my xlab is plotting this text at oposite ends of axis. I would like to represent my lable like this: Moran's I ...but with the I in italics. For some reason they seperate and position at oposite ends of the axis?? Thank you library(lattice) dat <- data.frame(x = rnorm(10),y = rnorm(10)) xyplot(y ~ x, dat,xlab=expression("Moran's
2013 Dec 13
1
data point labeling in xyplot
Hi Folks, I have data with a format like: ID y param1 param2 groupingFactor1 groupingFactor2..... 1 ... 1 1 1 2 2 2 2 3 3 3 so several grouping factors and repeated measures. I am using trellis and xyplot to get plot with several grouping factors. something like xyplot(y~x|grouping1*grouping2, data=na.omit(mydata), panel=function{panel.xyplot(x,y);....}); Lets say x is the
2006 Jan 05
1
Iaxy Ringtone
Hi all, I have a small query regarding ringing tones on an iaxy2. I have a customer who uses an iaxy to breakout to pstn via our *. However the customer complains that he gets no ringing tone whislt making calls, i just visited the site and can confirm this. I also have another customer who is presently in canada with an iaxy calling thru our * , he doesnt have this issue. I presume that the
2005 Sep 01
1
Spacing and margins in lattice...
Similar to my last question, I want to tighten up the spacing and margins in a plot I am doing with lattice. Here are the commands I'm using: data <- data.frame(x=c(1:3, 1:3), y=c(1:3, 1:3*2), cat=c("foo","foo","foo","bar", "bar","bar")) xyplot(panel=panel.superpose, y~x, data=data, groups=cat, type="b",
2006 Jul 16
1
Hmisc xYplot
Dear R community, I am having trouble with a particular plot that I am trying to produce using Hmisc's xYplot function. I've been using primarily lattice and Hmisc packages for my plotting needs for the past few years, with great success. However, what I want to do now with xYplot is plot more than one data trend in the same panel, much as I would use xyplot from package lattice in
2009 Jan 23
1
plotting curve in xYplot -- using panel.curve
Hello, I am trying to plot a curve over points plotted with se's in xYplot (see example below). I can get Figure 1 below to plot the data with error. However, I keep getting a the error message "Error using packet 1 object "y" not found" Can anyone see what I am doing wrong? Thanks! John ------------------------------- a=0.002; b=31.7; c=0.51
2006 Dec 28
2
lattice xyplot: plot multiple lines with different colors
Hi everyone, I am using the lattice package to plot some simulation results, by using the function xyplot(). However, I cannot find a way to plot multiple lines within the same xyplot and to have each of the lines be drawn in a different color. This is what I am currently doing: xyplot(a + b + c ~ x, my_data, panel = panel.lines) but, of course, all lines are drawn in the same color. What
2013 Mar 12
2
Specifying point symbol fill colour in lattice xyplot keys
Dear all, When defining explicit keys with xyplot, I have previously used the fill parameter to set the background colour of point symbols. That's no longer working for me, and I am wondering whether it's a bug or whether I've misinterpreted the documentation and have been relying on a feature wasn't intended. If the latter, can anyone suggest the correct way to do it?
2006 Aug 29
2
lattice/xyplot: plotting 4 variables in two panels - can this be done?
Hi, I would like to create a plot of y1,y2,y3,y4 against x for several subjects such that y1 and y2 are plotted against x in one panel and y3 and y4 against x in another panel. Thus if there are 3 subjects I should end up with 6 panels. Is there a simple way of doing so (i.e. without calling xyplot() several times, and then padding the results together)?? Regards S?ren
2009 Aug 18
1
second y-axis in lattice xyplot
Dear R-help, I recently discovered lattice xyplot, but have been struggling with plotting a second y-axis. I am able to do this with plot() but can't figure it out in xyplot. Any help would be appreciated. I have found help on adding a second Y-axis when the data is all part of the same data frame, but I have two different data frames. Both data sets are being plotted against "Date".
2011 Mar 20
3
problem with xyplot
Hi all, I am having a problem using xyplot from lattice library. I am plotting one variable against another one, conditioning on two other variablesm one of which has 3 levels and the other 6 levels. The output is thus a 6x3 panel plot. Here's my code: print((xyplot(CloDurPercent[CloDurNA != 'NA' & Mscor<3.5]~ConsDur[CloDurNA != 'NA' & Mscor<3.5]|Pos*ConsId,