similar to: : Adding a line in the graph of 'plot()'

Displaying 20 results from an estimated 20000 matches similar to: ": Adding a line in the graph of 'plot()'"

2004 Nov 26
3
Response Surface
Hi. I'm a student at Simon Fraser University in British Columbia, Canada. I can't for the life of me figure out how to plot a 3D surface (A 3D response surface to be more specific) in R. I found your email address on a web board, and saw someone mention wireframe(), but using the help in R yielded no results. Any suggestions? Thanks. Dean Vrecko
2006 Jul 29
1
DOE in R
Hi. I'm a student in a graduate program at Simon Fraser University in Canada. I am trying to run a simple screening experiment with some simulated data. I simply want to do an ANOVA of an experiemnt with 5 factors (4 have 2 levels, the last has 3 levels) and 48 runs (ie, full factorial). The thing is that I have multiple observations for each level combination (run). So, 1) How do I do
2004 Nov 29
0
RE: Adding a line in the graph of 'plot()'
The general nature of your question means there are a multitude of answers. if you type '?abline' it will give you an example of a line drawn over a plot. type ?segments, ?lines, ?points, ?text and go through the examples and try them out The help pages to the base package 'grid' includes an introduction to using the various drawing mechanisms see ?par for the 'new'
2005 Mar 04
1
Basic stratification calculations
Hi. I'm a student at SFU in Canada. The basic thing I want to do is calculate means of different strata. I have 2 vectors. One has the values I want to take the means from, the other is the four strata I am interested in. So I essentially want to break up the information vector into the four strata and calculate four means, one for each stratum. How can I do this in a reasonable way? Thanks
2007 Apr 05
1
Moving plot labels
Hi. I'm sure this is a simple problem, yet I can't seem to get simple help for it. I am simply trying to move my xlab in plot(). I am currently using the following commands: plot(c(-0.25,18),c(0, max(patient10)),type="n", ylab="SD of POST estimator", xlab="Scans \n (a)") But when the plot prints, the xlab is printed over top the xaxis. I tried adjusting
2005 Nov 03
1
Problems with abline adding regression line to a graph
Hello all, R2.1.1, W2k I try to make a plot of a simple regression model in this way: > with(njfA_bcd, { + plot(TC_OS.G31,Prot,cex = 2, col = "red", xlab= "TC/OS at GS32", + ylab="Grain crude protein (CP)") + }) This part works well and produces the datapoints as red circles. When I try to add a line, using a fitted linear model in a way that works perfect
2009 Feb 12
3
Adding abline in Lattice graph
Hi,I would like add a horizontal line at 126 (col=red) and a vertical line at 6.5 ( col= blue) in each panel .How should I use the panel.abline function in the following code I am using: ------------------ library(lattice) with(reg.dat.5,coplot(lbxglu~lbxgh|eth,panel=panel.smooth,xlab="ABC", ylab="FBG")) ---------------------------------------- Thanks a lot. Professor of
2009 Oct 01
4
Color of graph
I am trying to plot a line graph for 3 or more regression lines abline(m1) abline(m2) abline(m3) Can I change the color of each line? if so how? Thanks in advance Ashta [[alternative HTML version deleted]]
2006 Jun 19
4
Qurey : How to add trendline( st. line) in Graph
How to add trendline (i.e. straight line passing through maximum points) in graph. I have worked on the data given below. Please tell me how to add trendline in the graph. The script is as follows =================================== start ==================================================== # The data is as follows data <- c( 0.01, 0.02, 0.04, 0.13, 0.17 , 0.19 , 0.21 , 0.27 , 0.27 ,
2010 Aug 12
3
Plotting one dot in a graph
I'd like to plot a point at the intersection of these two curves. Thanks x <- seq(.2, .3, by = .01) f <- function(x){ x*cos(x)-2*x**2+3*x-1 } plot(x,f(x), type = "l") abline(h = 0)
2012 Sep 20
3
Line over Boxplot
Very much a rookie at R, and have only recently started using it again so pardon the simple question. I am trying to produce a box plot from one data set and then overlay a line plot from another data set. The box plot data set is made up of 20 sets of 30 data points, or 600 total data points. The line has only 30 total data points. The box plot is plotting fine, but for some reason, the line plot
2008 Feb 21
2
coloring a graph left or right of an abline
Dear R community, I would wish to color the background of my histogram differently to the left and right of an abline... Can you please help? Thankin you, Georg. **************************** Georg Ehret JHU Baltimore - USA [[alternative HTML version deleted]]
2009 Dec 28
2
refering to the 'boundaries' of a graph
Please see this code for a demonstration of my problem... xlim <- c(-1,5) plot(1:4, xlim=xlim) abline(v=xlim[1]) abline(v=xlim[2]) When I refer to xlim, it is not referring to the boundaries of the graphical region, it refers to the maximum and minimum xticks. My question is how can I refer to the x axis boundaries (and similarly y axis) of the graph? -- View this message in context:
2007 Jan 16
3
plot portion of a line
Dear HelpeRs, Given: x <- rnorm(50) y <- rnorm(50) plot(x,y) abline(lm(x ~ y)) Is there a way to plot just a portion of the line? Say for values of x > 2.0 or x > -2.0 and x < 4.0. (Still fitting all the points.) Thank you, jab -- John Bollinger, CFA, CMT www.BollingerBands.com If you advance far enough, you arrive at the beginning.
2017 Sep 19
3
Graph f(x) = 1/x
Dear All: good morning I am trying to graph the function y=f(x)=1/x over the interval (-5,5). But I am getting an error message. Please see below. I am getting the error message: *Error in xy.coords(x, y, xlabel, ylabel, log) : * * 'x' and 'y' lengths differ* x x <- seq(-5, 5, 0.01) y < 1/x plot(x,y, type='l', xlim=c(-5, 5), ylim=c(-5, 5), xlab = "x",
2009 Feb 22
3
line joining graphs
hi, I need to draw a line joining graphs,but abline stops within a graph.What do i do to cover portions between two graphs -- Rajesh.J [[alternative HTML version deleted]]
2009 May 13
1
Overlaying two plots
Hi useR's, I want to overlay an image plot over a world map and I can do it, but just not the way I need to do it. Here is the code I am using (with data file attached) to create my baseline map: library(sp) load("TM_WORLD_BORDERS_SIMPL-0.2.RData") par(bty="l") plot(wrld_simpl, axes = TRUE, ylim = c(-90, 90), xlim=c(-180, 180), asp=1.5) lim <- par("usr")
2008 Oct 17
1
use of empty space in split graph device
Hi all, I divide the graphical device into 4 ---mfrow=c(2,2)--- to plot 3 boxplots graph. Thus I get an empty space for the fourth graph. I d'like to place a legend in this space. legend(xxxx) creates a legend in the last graph (the 3rd) I'd like a legend in the empty space. How may I do it? #graph parameter par( fin=c(6,6), #dim graph mai=c(1,1,0.5,0.5) #marges graph
2012 Apr 06
2
R CMD check returns NOTE about package data set as global variable
I'm developing a package that comes with a data set called RutgersMapB36. One of the package's functions requires this data frame. A toy example is: test<-function() { data(RutgersMapB36) return(RutgersMapB36[,1]) } R CMD check returns a NOTE: test: no visible binding for global variable 'RutgersMapB36' Is there any way to avoid this NOTE? Thanks, Brad --- Brad
2004 Jan 14
1
Trellis graph and two colors display
Hello, I would like to display two groups of dots in different colors or style and additionnaly a linear regression for all the dots in panel plots of a Trellis graph. Actually to get in each panel the equivalent of: plot(x[mois==3],y[mois==3],col="blue") points(x[mois==9],y[mois==9],col="red") abline(lm(y~x), col="green") "mois" being a grouping