search for: clipplot

Displaying 20 results from an estimated 21 matches for "clipplot".

2008 Jan 23
4
image question
Hi, I have a question regarding the image function. Is there a way to specify a separate color set for each column in the matrix? TIA, ajar. [[alternative HTML version deleted]]
2006 Jun 02
2
plot with different color
Hi how can I plot a series of number as a line, but with lines above a threshould as one color, and with lines below the threshold as another color. for example, a numeric vector: rnorm(1:100), and plot these numbers in the original order, but lines above the horizontal line at 0 are in red, and lines below in blue? Thanks
2008 Apr 08
2
diagonally fill a rectangle with color gradient
Hi, Is it possible to diagonally fill a rectangle with a color gradient? I noticed that the gradient.rect of plotrix could fill a rect either up and down or from side to side. I am looking for something similar but fills diagonally instead, e.g., from the upper left corner to the bottom right. Does anyone know how to do it in R? Thanks, -- Tom [[alternative HTML version deleted]]
2007 Dec 30
1
Histogram with different colors for different portions
Dear Rusers, I would like to color different sections of a histogram different colors. I have an example that was done by "brute force" given below. Has anyone implemented something like this in general? If not, any suggestions/pointers on how to write a general function to do so would be most appreciated. Alan-
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.
2009 Jan 24
2
Is abline misbehaving?
Hi experts, I was graciously offered a function to enhance abline by restricting the extent of the line to less than the plotting region. This seems a useful idea, and it looked like the easiest way to program it was to set up a clipping region with "clip", draw the abline and then restore the previous clipping region. Let us call this function ablineclip. After quite a bit of
2009 Jan 24
2
Is abline misbehaving?
Hi experts, I was graciously offered a function to enhance abline by restricting the extent of the line to less than the plotting region. This seems a useful idea, and it looked like the easiest way to program it was to set up a clipping region with "clip", draw the abline and then restore the previous clipping region. Let us call this function ablineclip. After quite a bit of
2006 May 24
3
Regression line limited by the rage of values
Hi In R, using plot(x,y) followed by abline(lm(y~x)) produces a graph with a regression line spanning the whole plot . This means that the line extends beyond the swarm of data points to the defined of default plot region. With par(xpd=T) it will span the entire figure region. But how can I limit a regression line to the data range, i.e between (xmin,ymin) and (xmax,ymax)? Sorry for
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]]
2011 Mar 17
4
Help with plotting a line that is multicoloured based on levels of a factor
...ot the points. i.e., plot(date, flow, type="l") But I would like the colour of the line to change with each level, i.e., plot(date, flow, type="l", col=colour) But this doesn't work because the line is continuous and the colours are discrete. I looked into using clipplot, but I'm not sure how I would specify limits that would give different sections of the line correct colours. Does anyone know of a way to draw a line with different colours? One way I thought of was to plot each level of flow separately and then build the plot up, i.e., plot(data$date[data$l...
2006 Nov 02
3
Complex plotting problem
Hello, I would like to make a plot (preferably lines, but points will do too), where the line segment changes color depending on the value of the y-axis. For example, let's suppose the y-axis range is from -1 to 1. Points close to -1 would be colored blue, while points close to 1 will be colored red. Points in between will be varying degrees of blue/red depending on how close they
2007 Sep 17
4
graphs with gradients of colors
Hi All, I would like to fill the area under a curve with a gradient of colors. Are there any packages or trick I could use Thanks Stefan Stefan Van Dongen Antwerp [[alternative HTML version deleted]]
2007 May 03
0
unscrible pls
...as long as the arc is less than half a circle, > for arcs greater than half a circle, you could draw the whole circle > then use this to draw an arc of the bacground color over the section you > don't want): > > library(TeachingDemos) > plot(-5:5, -5:5, type='n') > clipplot( symbols(0,0,circles=2, add=TRUE), c(0,5), c(0,5) ) > > Hope this helps, > > -- > Gregory (Greg) L. Snow Ph.D. > Statistical Data Center > Intermountain Healthcare > greg.snow@intermountainmail.org > (801) 408-8111 > > > > > -----Original Message----- >...
2007 Apr 26
2
Drawing Tangent
Dear all R-users, I would like to draw a tangent of a given function for a particular (given) point. However the straight line representing it should not cut any axis, it should be a small line. Can anyone tell me how to do this? Thanks, Arun [[alternative HTML version deleted]]
2009 Jan 22
2
plot: abline() - define line length
Hi, is there a way to define, that a line drawn via abline() should only go from for example -2 to 1 on the x-axis (with something working similiar to xlim()) ? thanks for any help!
2008 Jul 17
3
Histogram with two colors depending on condition
Dear List, Say, we generate data like this- dat<-rnorm(1000,1,2) hist(dat) How do i make the histogram, say, red (col = 2) before X = dat = 0, and rest say, green (col = 3) beyond X = dat = 0 in R? The resulting histogram could be like this http://ehsan.karim.googlepages.com/histogram.JPG (edited) Thanks in advance. Ehsan http://ehsan.karim.googlepages.com/diaryofastatistician
2008 Aug 16
2
To package or not to package?
I'd like a little advice as to when it's appropriate to create an R-package and submit it, as opposed to just providing the source to some simple code. In this case, I've written a function that draws a line plot (with options for points, etc) where the color of the line changes at specified values of the y-data (e.g., it's one color below -10, another color between -10 and
2008 Jan 16
3
color ranges on a 2D plot
useR's I am trying to color the points on a scatter plot (code below) with two colors. Red for values 0.5 -1.0 and blue for 0.0 - .49. Does anyone know a easy way to do this? x <- runif(100, 0, 1) y <- runif(100, 0, 1) plot(y ~ x, pch=16) Thanks, dxc13 -- View this message in context: http://www.nabble.com/color-ranges-on-a-2D-plot-tp14893457p14893457.html Sent from the R help
2007 Mar 20
5
abline within data range
Dear R helpers, I would like to have abline, for a lm model for example, lying within data range. Do you know how to get it? Thank in advance Nguyen D Nguyen #CODE x<- rnorm(200, 35,5) y<- rnorm(200, 0.87,0.12) plot(y~x, xlim=c(0,50), pch=17, bty="l") abline(lm(y~x)) # I would like abline is between min(x) and max(x) [[alternative HTML version deleted]]
2008 Jun 19
4
Controlling the length of line with abline(lm())
Hi I just realized that when I use linear regression to draw a line through my data points with something like the following: abline(lm(y ~ x)) the length of the line is infinite, i.e., the line goes beyond the smallest and the largest data values. This seems not very right to me (not to mention it looks unaesthetic). I do not mean to imply that the straight-line behavior of my system is