similar to: plotting question: filling area between two lines

Displaying 20 results from an estimated 10000 matches similar to: "plotting question: filling area between two lines"

2007 Aug 30
2
Assigning line colors in xyplot
Hi, I have a dataframe containing data from individuals 1, ..., 12 (grouping variable "g" in the data frame below), which belong either to "A" or "B" (grouping variable "f"): set.seed(1) tmp <- data.frame(
2004 Mar 22
2
Handling of NAs in functions lrm and robcov
Hi R-helpers I have a dataframe DF (lets say with the variables, y, x1, x2, x3, ..., clust) containing relatively many NAs. When I fit an ordinal regression model with the function lrm from the Design library: model.lrm <- lrm(y ~ x1 + x2, data=DF, x=TRUE, y=TRUE) it will by default delete missing values in the variables y, x1, x2. Based on model.lrm, I want to apply the robust covariance
2004 Mar 04
1
Ordinal logistic regression using spatial data
I have a spatial data set with ordinal response variable containing four levels. I would like to know if and how spatial autocorrelation can be taken into account when ordinal logistic regression is used (e.g. the function lrm from the Design package). Thanks for your help! Christof
2004 Feb 25
2
circular filter
I try to find a circular filter that I can export to be used in a spatial software. Assuming, we have a matrix, representing 9x9 regularly spaced points with the center point 'filter[5, 5]'. In this example, I want to find a function that weighs all neighbor points within a distance of d=4 units with 1: > filter <- matrix(0, 9, 9) > filter <- function() ... > filter
2002 Oct 15
2
glm and Newey-West estimator
Dear R-users, has anybody combined the glm function with the Newey-West estimator of variance, similar as in Stata 7.0? I'd like to estimate corrected standard errors within a logistic regression model, taking into account the auto-correlated binary observations within individuals. I use R1.5.1 on Mac OS X (10.2). Thanks, Christof
2011 Nov 18
1
How to fill irregular polygons with patterns?
Hi, I'm looking the best way to fill irregular polygons with patterns, Something like the function grid.pattern do, but my case is with irregular polygons. Whit this script I can get it, but I'm looking for an "elegant" solution.. library(grid) grid.polygon(x=c(0.2, 0.8, 0.6, 0.6, 0.8, 0.2), y=c(0.2, 0.2, 0.3, 0.5, 0.7,0.7), gp=gpar(fill="grey",
2018 Jan 12
1
shading (fill) the area between two lines
Dear All: I am trying to shade the area between the two lines; *line 1* and *line 2*. You can use this code as an example. x100<-c(-1,1,2,3,4,5,6,3) y100<-c(4,5,3,1,4,4,2,-1) plot(x100,y100) *##### line1* abline(a=-(Beta0-1)/Beta[1,2], b=-Beta[1,1]/Beta[1,2], lwd = 3, col="skyblue", lty=3) ##### lty=3, *##### line 2* abline(a=-(Beta0+1)/Beta[1,2],
2001 Aug 02
1
sample()
Dear R users, is there a way to extract directly rows instead of column vectors using the function sample()? I have already tried to transpose and back-transpose my dataframe, but I couldn't manage to get rid off the levels in the resulting dataframe. Macintosh G4 (Mac OS9.1), R Version 1.3.0 Any help is welcome! Christof -- Christof Bigler Mountain Forest Ecology ETH-Zentrum HG G21.4
2008 Jul 20
2
fill in area between 2 lines with a color
Hi - I'd like to have the area between 2 lines on a x-y plot be filled with grey, but I haven't had any luck using polygon or rect. (In reality, I'd like to do this for twice - once for a low group and once for a high group - and then I'd like to plot a set of data points for a 'normal' group together with these 2 grey areas.) Here's a simple example of the 2 lines:
2012 Feb 12
2
plotting dates, incorrectly scaled x-axis?
Hi, I want to plot with axis.Date(), but something is scaled incorrectly. The red vertical line in is put on a totally wrong position. (sample below) Do you have an idea what I'm doing wrong? Thx Christof x11(width=30, height=20) x<-seq(as.Date("2010-02-27"), as.Date("2011-03-28"),"month") y <- seq(0,100,length=length(x)) plot(y ~ x,
2004 Apr 20
2
polygon
Dear all In order to clearly mark values wich are larger than a treshold value, I would like to color the surface below the line given by plot (yy~xx). To color is only the surface between abline (treshold) and yy if they are larger than the specific limit. I guess I can use the function polygon, but I can not find any valuable solution. I'm grateful to you for an advice or an example.
2005 Jul 04
1
Colors in mtext
I want to assign different colors to different strings using mtext(...). However, when I use something like mtext(text=c("string1","string2","string3"), col=c("black","blue","red"), side=3, line=0) string2 and string3 are printed over string1. When I use paste("string1","string2","string3"), the series
2007 Jan 25
7
filling the area
Please, how to fill the area under the curve? x <- c(1:10) y <- c(rnorm(10)) plot(x,y) lines(x,y) Thanks, Mauricio Cardeal
2003 Jul 22
3
curves with shaded areas?
Hi, I want to make a plot with abline where the area below or above the curve is shaded. I can't find any documentation on that. Can anybody help me with that? thanks, Juffi
2008 Jul 08
1
shading an area in a edf
Hi, I've got the following edf: *** x = c(1.6,1.8,2.4,2.7,2.9,3.3,3.4,3.4,4,5.2) F2.5 <- ecdf(x) plot(F2.5, verticals= TRUE, do.p = TRUE, lwd=3, ylab = "", xlab = "", xlim = c(1,5.5)) abline(h= (0:5)*0.2) #mean abline(v=mean(x), lwd=2) mtext(text=expression(bar(x) == 3.07), side=1, adj=0.462, padj=3, cex=1) *** Now I would like to
2009 May 24
1
filling area under a function line
Hi R collective, I quite like the "curve" function because you can chuck a R function into it, and see the graph in one line of R. I had a google and found some threads for filling under the line; http://tolstoy.newcastle.edu.au/R/e2/help/07/09/25457.html However they seem to miss the point of the simplicity of going, "I wonder what that looks like, and can I have some colour
2007 Jun 25
3
How to shadow 'power' area?
Dear all, Suppose I plot two normal distributions (A and B) side by side and add vertical line which hipotheticaly represent alpha value; e.g.: x <- seq(-3.5,5, length=1000) y <- dnorm(x) # Plot distribution A plot(y~x, type='l',axes=F,xlab="",ylab="",lwd=2) # Plot distribution B y2 <- dnorm(x-1.5) lines(y2~x,lwd=2) # Plot vertical line for alpha value
2003 Mar 12
1
Filling graphic objects
I have used polygon() to mark the confidence limits of a survival curve. In another project, I have used the col parameter to fill my boxplots. The poly() description refers to filling but actually produces hatching (i.e. lines ). boxplot() does truly fill the boxes with a colour or shades of grey (e.g. col="red"). My novices perception of R graphics is: If you can hatch it, you
2019 Feb 28
2
R cairo_pdf function does not respect plotting boundaries
Hello all, When producing a plot in R using the cairo_pdf device, the resultant plot does not respect the plotting boundaries. Lines and shaded regions will spill over the lower x-axis and the right-side y-axis (sides 1 and 4). I would like to know if it is possible to fix this behaviour when using 'cairo_pdf' in R? As an example, see the image at this web link:
2019 Feb 28
2
R cairo_pdf function does not respect plotting boundaries
Hello all, When producing a plot in R using the cairo_pdf device, the resultant plot does not respect the plotting boundaries. Lines and shaded regions will spill over the lower x-axis and the right-side y-axis (sides 1 and 4). I would like to know if it is possible to fix this behaviour when using 'cairo_pdf' in R? As an example, see the image at this web link: