similar to: Controlling the extent of ablines on plot

Displaying 20 results from an estimated 1000 matches similar to: "Controlling the extent of ablines on plot"

2011 Jun 22
2
Linking 2 columns in 2 databases and applying a function
Hi all, I have two datasets, one that represents a long-term time series and one that represents summary data for the time series. It looks something like this: x<-data.frame(Year=c(2001,2001,2001,2001,2001,2001,2002,2002,2002,2002,2002,2002), Month=c(1,1,1,2,2,2),Q=c(5,5,5,6,6,6,3,3,3,4,4,5)) y<-data.frame(Year=c(2001,2001,2002,2002),Month=c(1,2,1,2),Threshold_Q=c(5,5,4,4)) What I'd
2011 Jul 25
3
Finding/identifying a value within a factor
Hi all, I'm trying to identify a particular digit or value within a vector of factors. Specifically, this is environmental data where in some cases the minimum value reported is "<" a particular number (and I want to manipulate only these). For example: x<-c("1","2","3","4","<1") For a dataset that is hundreds or
2011 Dec 12
4
Boxplot of multiple vectors with different lengths
Hello, I'm attempting to write a code that automatically imports data from different files (with different lengths-just one variable) and makes tidy box plots for comparison. I can successfully import the data and create a list of the vectors I want to compare. But I cannot, for the life of me, figure out how to generate box plots using the "list" option. Suppose these are my data:
2011 Dec 12
1
Please delete my e-mail judit.barroso@montana.edu
Please, I am receiving lot of e-mails that I do not want. Please could you delete my e-mail. Thank, Judit -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Thomas Adams Sent: Monday, December 12, 2011 3:22 PM To: Bert Gunter Cc: r-help at r-project.org Subject: Re: [R] Boxplot of multiple vectors with different lengths Bert,
2011 Jan 25
5
Counting number of rows with two criteria in dataframe
Hi R-users, I'm trying to find an elegant way to count the number of rows in a dataframe with a unique combination of 2 values in the dataframe. My data is specifically one column with a year, one with a month, and one with a day. I'm trying to count the number of days in each year/month combination. But for simplicity's sake, the following dataset will do:
2010 Nov 27
1
How to add multiple ablines
Hi folks Run; > ToothGrowth > attach(ToothGrowth) > toothgrowth=lm(len~dose) adding abline: > abline(toothgrowth) I got it done adding single abline. How to add more ablines on the same diagram? I found following thread, applying "mapply" command; Plotting multiple ablines http://www.mail-archive.com/r-help@r-project.org/msg51543.html mapply(abline, (converge$kY +
2018 Jan 29
2
Add ablines
Good morning, I have some problem adding ablines in Rstudio. The lines drew by the software doesen?t match with the added values, what can I do? pfaOK<-qcc(D[!trial], sizes=size[!trial], type="p", nsigmas=2, data.name="Polli positivi al Campylobacter") pfaOK1<-qcc(D[!trial], sizes=size[!trial], type="p", data.name="Polli positivi al Campylobacter")
2010 Sep 13
1
shade area between 'ablines'
Hi, want to shade the area between dotted lines: x=c(1,5);y=c(1,5) plot(y~x, type='n') abline(v=c(2,3), lty=2) sometnig simple needed. tried with polygon.... thx, robert -- View this message in context: http://r.789695.n4.nabble.com/shade-area-between-ablines-tp2537352p2537352.html Sent from the R help mailing list archive at Nabble.com.
2010 May 14
2
Deleting rows with NA from isolated column in matrix
Hi all, I'm relatively new to R and have a data management problem. I am importing a data matrix with some columns that have missing values. I am trying to figure out how to delete rows with NA for data FOR JUST ONE SPECIFIED column. For instance, with the example matrix: x<-matrix(nrow=5,ncol=3) x[,]<-1 x[5,1]<-NA x[3,3]<-NA how do I tell R to delete any rows with an NA value
2007 Feb 21
3
Different gridlines per panel in xyplot
In the example R script below, horizontal gray gridlines are drawn at y coordinates where the points are drawn with the code: panel.abline(h=y, v=xScale, col.line="gray") How do I change this so that the horizontal gray gridlines are drawn at y coordinates where the y labels are drawn? The challenge is that each panel has different y-ranges (in my real example the y-ranges and
2009 Nov 20
1
Hmisc and Lattice question on gridlines
I have been using lattice xyplot and am quite pleased, and I can use the type=c("b","g") to have it print gridlines into the page, yet if I want to have a line plot with points on it, how do I get the xYplot to print gridlines (I use Hmisc xYplot because of its bands method which allows plotting of confidence intervals). Any suggestions? I have looked at the panel functions but
2009 May 16
2
Question about barplot: gridlines & value labels
Hello! I promise I looked into help files before asking. Still cannot figure it out. I think it's because I am totally confused what packages use lettice, which use trellis, etc. Sections 1 and 2 below produce the data and the data to plot. My question is about barplot in Section 3. I am trying to: 1. add only horizontal gridlines and manipulate the type and color of that line. tck = 1 is not
2012 Jan 20
3
abline by groups
Hello, I have 2 variables - x and y, that belong to separate groups. I want to plot all the x and y together, but show separate abline for each group. It can be done in ggplot2, but is there a simpler way to draw ablines by group? e.g., mydata <- data.frame(x = 1:20+rnorm(20, -3, 1), y = seq(1,20,by=1), group = rep(letters[1:5],20)) plot(x,y,col=mydata$group) # need to get separate ablines
2010 Apr 22
2
How to insert gridlines in lattice density plot
Greetings. How can I insert gridlines in the following density plot call? Must one compose a panel function? 'data.frame': 46 obs. of 2 variables: $ fallrates: num 5.2 7.1 7.1 9.8 3.7 7.5 5 6.2 1.5 2.9 ... $ prepost : Factor w/ 2 levels "post","pre": 2 2 2 2 2 2 2 2 2 2 ... library(lattice) densityplot(~fallrates, groups = prepost,
2006 Jan 18
1
phyper returns 1 if x==k (PR#8499)
Full_Name: Utz J. Pape Version: 2.2.0 OS: linux Submission from: (NULL) (141.14.23.12) If I use phyper and set parameter x equal to k (meaning that all balls I draw are white) phyper returns 1 which is not (always) correct: pape at xxx:~> R2.2.0 --vanilla R : Copyright 2005, The R Foundation for Statistical Computing Version 2.2.0 (2005-10-06 r35749) ISBN 3-900051-07-0 R is free software
2004 Mar 11
1
tics and grids
Hi, Whats the easiest way to set a desired interval for tics on axes in R ? And will the 'grid' command put gridlines on all tics automatically ? I tend to get stuck with graphs with ranges 0-1 with only 2 tics and 2 gridlines in the 0-1 range, while I would like 10 tics (or every 0.1) tnx, Piet please reply to pvremortNOSPAM at vub.ac.be
2009 Aug 25
1
Lattice graph tweaking
To: silwood-r Subject: Removing lattice graph gridlines and editing label box colour Hi, Is it possible to remove the background gridlines from a lattice graph (ie graph made up of multiple individual graphs with annoying blue grid in the backgroun)? Also, Is it possible to change the colour of the individual graph label boxes? - ie the default pink boxes above the individual graphs Thanks
2008 May 07
2
figure margins too large for a barplot in png, pdf ok
I've used to have a script with a barplot command it in, preceded by a png: png(graph.file,height=H,width=W) barplot(t,names.arg=breaks[2:(length(t)+1)],tck=gridlines) -- worked before R 2.6.2. When I tried it in R 2.6.2, which I have for a while but didn't run with that script, it complained, the margins too large, and I've googled the messages from our list where neither
2009 Feb 18
1
interaction.plot - gridlines and formatting legend title...
Thank you for providing advice on this graphics question. I am building an interaction.plot. d=data.frame(xx=c(3,3,2,2,1,1),yy=c(4,3,4,3,4,3),zz=c(5.1,4.2,4.4,3.5,3.3,-1.1,-1.3) d[[1]]<-as.factor(d[[1]]) d[[2]]<-as.factor(d[[2]]) print(d) interaction.plot(d$xx, d$yy, d$zz, type="b", col=c("red","blue"), legend=F, lty=c(1,2), lwd=2, pch=c(18,24),
2012 Nov 07
1
change colour of geom_step by scale_colour_manual
Hi, Color of my step plot is now by default. Now I'd like to change the color as the grey scale I specified. I don't know why I got three black plot. Here I attach two version of codes. The first one produces a step plot with color by default. The second one, modified from the first one, is not producing the grey scale I want. Any help would be highly appreciated. [version 1- working]