Displaying 20 results from an estimated 2000 matches similar to: "shading in line plots"
2016 Apr 27
4
polygon angle option perpendicular to axis
I am trying to use the angle option in polygon to create polygons filled with horizontal and vertical lines. The polygons I am crating are irregular and it the angle function appears to set the angle of the shading perpendicular to the polygon sides rather than perpendicular to the axes. Is there any way to set the angle relative to the axes rather than relative to the polygon sides?
2007 Jan 29
2
countour and poygon shading
Hi,
I have a contour plot and I want to shade a polygon (the area below a line)
but the polygon shading wipes out the contour lines. Does anybody know how
to shade the polygon and still see the contour lines? Thanks.
Jeff
2007 Aug 05
1
Selectively shading areas under two density curves
Dear Listers,
I am drawing a plot of two density curves, for male and female incomes. I would
like to shade/hatch/color (whatever) the areas under the curves which are
distinctive for each gender. This is the code I have tried so far:
m <- density(topmal.d$y, bw = "sj")
f <- density(topfem.d$y, bw = "sj")
par(mfrow = c(1,1))
plot(x = c(0,400), y = c(0,0.02), type =
2016 Apr 28
1
polygon angle option perpendicular to axis
Thanks for the question. Here is a sample of the code for my plot:
Top = c(34, 39, 42, 45, 46, 41, 41, 40, 43, 38, 33, 33)
Bottom = c(24, 29, 32, 36, 32, 34, 32,41, 40, 39, 29, 24)
plot(1,1, col = "white", xlim = c(1.3,11.7), ylim = c(0,80), axis = FALSE, xaxt = "n")
axis(1, at = c(1:12))
polygon(c(c(1:12),c(12:1)), c(top, bottom), col =
2016 Apr 28
1
polygon angle option perpendicular to axis
The angle is not based on the polygon edges, but it can seem that way if you do not use the asp=1 argument in your plot. Try this example,
> plot(1:10, 1:10, type='n')
> x <- c(1, 3, 5, 3)
> y <- c(3, 5, 3, 1)
> polygon(x, y, angle=0, density=10)
> polygon(x, y + 4.5, angle=45, density=10)
> polygon(x + 4.5, y + 4.5, angle=90, density=10)
> polygon(x + 4.5, y,
2009 Jul 04
2
Shading the area between lines
Hi,
I have a graph with seven parallel horizontal lines. Is it possible to
shade the area between two adjacent lines?
Thank you in advance,
Hannu
2012 Sep 13
2
Shading in prediction intervals
I have the following code for the minimum and maximum of my prediction interval
> y.down=lines(x[x.order], set1.pred[,2][x.order], col=109)
> y.up=lines(x[x.order], set1.pred[,3][x.order], col=109)
domain=min(x):max(x)
polygon(c(domain,rev(domain)),c(y.up,rev(y.down)),col=109)
It doesnt seem to shade the right region, it gives me a trapezoid.
Any help? Thanks!
2008 Oct 24
2
Shading underneath a line plot.
Hi,
I'm sure this should be fairly simple to do but I haven't found an example.
I have 10 data points which are plotted as a line, I want to shade under
this line with a colour. Other examples have shading under curves where
there are two sets of data use polygons.
mydata <- c(268,251,254,250,244,246,247,243,241,243)
plot(mydata, type="o")
2006 Aug 01
2
rgb and col2rgb color conversion/modification/shading
I want to get a lighter shade of a color...I have a lot of colored objects and
want each one printed as a foreground against a slightly lighter background.
I thought I could try something like changing the alpha channel by first
converting it to rgb.
But prior to trying that, I'm stuck with how to get the color after converting
using col2rgb() to be interpreted again as a color, rather than
2007 Nov 02
2
Shading area under PDF of t -distribution
Dear R experts,
I have plot the PDF of t distribution with df = 74.
curve(dt(x,df=74),from=-4, to=4)
how can I shade the area under curve (for example, col="red") from t=+- 1.996?
Thank you.
Regards,
CH
--
CH Chan
Research Assistant - KWH
http://www.macgrass.com
2009 Aug 13
3
shading between two smoothed curves
I have a set of 52 weekly values, one is the desired high lake stage for
a week, and the other is the desired low lake stage for each week. It
looks like this:
week
High
Low
1
16
14.5
2
16
14.5
3
15.95
14.45
4
15.84
14.34
5
15.73
14.23
6
15.61
14.11
7
15.5
14
8
15.38
13.88
9
15.25
13.75
10
15.13
13.63
....
52
15
13.5
I can plot out two nice curves
2002 Nov 01
1
init.data function error
We had been using R1.2.3 "print tip lowess function" as described by
Terry Speed's group to normalize microarray data and up until this week
the commands we were using were working fine.
First, we load our data using arrayname<-read.table("filename",
header=T)
and then check that the table is OK.
We format the data list using setup1<-init.data() and usually get a
2016 Apr 28
0
polygon angle option perpendicular to axis
Filling polygons with lines is a throwback to the time when the height
of quality graphics was the mechanical pen plotter (a device that used
a pen in a mechanical arm to draw the plot on a piece of paper).
Computing and printing technology has advanced quite a bit from that
day, so you may want to reconsider why you want polygons filled with
lines instead of just a solid color (and I consider
2005 Oct 16
4
Cannot telnet to port 5038 on asterisk
Hi,
I cannot do the following:
telnet 127.0.0.1 5038
I get connection refused and this is preventing AMP from installing. I
had this working when I was using FC3 but I had to upgrade to FC4 for
another application. So I am running PHP5, MYSQL 4 with FC4 and asterisk
is running (I had this problem before with FC3 and it turned out
asterisk was not running) I am using 1.2.0 beta1 Asterisk
2008 Aug 28
4
Help with shading a polygon below a segment of a curve (normal distribution)
Dear R users,
I still feel new to R so please apologize if I am doing something stupid
here. My use of the polygon() function produces a result that I cannot
comprehend: In a plot, I would like to shade the area below a normal
distribution. However, I do not want the entire area to be shaded, but
just the area on the right side of a vertical line that I draw through
the distribution (in
2007 Nov 29
1
Wireframe graph: black and white shading instead of color
All,
The code below produces a color 3D graph. I'd like to make it black and
white shading. I tried setting col.regions to FALSE but this just made it
completely white. I want the graph to look exactly as is, except black (or
grey) and white shading. Is this possible?
Cheers,
David
p.list = c(.01, .1, .25, .5, .75, .9)
cov.list = c(.2, .1, .05) ### leave out .01
X = rep(p.list, 3)
2016 Apr 28
0
polygon angle option perpendicular to axis
Tena koe Simon
plot(1:10, 1:10, type='n')
polygon(c(2,3,6,8), c(2,5,5,3), density=20, angle=90)
polygon(c(2,3,6,8), 5+c(2,5,5,3), density=20, angle=0)
I don't understand your problem. Perhaps if you "provide[d] commented, minimal, self-contained, reproducible code" it would help.
HTH ....
Peter Alspach
-----Original Message-----
From: R-help [mailto:r-help-bounces at
2006 Jan 10
2
standardized residuals (rstandard & plot.lm) (PR#8468)
This bug is not quite fixed - the example from my original report now =
works using R-2.2.1, but
plot(Uniform, 6)
does not. The bug is due to
if (show[6]) {
ymx <- max(cook, na.rm =3D TRUE) * 1.025
g <- hatval/(1 - hatval) # Potential division by zero here #
plot(g, cook, xlim =3D c(0, max(g)), ylim =3D c(0, ymx),=20
main =3D main, xlab =3D
2007 Oct 03
2
Shading area under density curves
Hello,
I have a question regarding shading regions under curves to display
95% confidence intervals. I generated bootstrap results for the slope
and intercept of a simple linear regression model using the following
code (borrowed from JJ Faraway 2005):
> attach(allposs.nine.d)
> x<-model.matrix(~log(d.dist,10))[,-1]
> bcoef<-matrix(0,1000,2)
> for(i in 1:1000){
+
2009 Nov 04
1
Patterned shading in ggplot
Am trying to produce a graph which prints out well in black and white using
ggplot2. I have the following example set up nicely, but want to shade the
red bars in one pattern and the blue in another so they print out clearly.
I tried changing colours to 1 light, 1 dark, but then the overlapping colour
looks virtually identical to the darker one. I noted the option density in
barplot, but