Displaying 20 results from an estimated 8000 matches similar to: "background color"
2010 Aug 15
2
Adding colored background area to a time series plot
Hi,
I am trying to add a rectangular colored background area to a plot of a time series of relative price changes. I believe that what I'm trying to do is very similar to the question and example given here:
http://www.mail-archive.com/r-help at stat.math.ethz.ch/msg73948.html
http://www.mayin.org/ajayshah/KB/R/html/g5.html
My problem/difference is that my time series looks like so:
>
2007 Jan 16
1
SARIMA problem
Hi,
I have a problem with the ARIMA function, occuring when I set the parameter per (the period of SARIMA model) to a high value (see the exemple bellow). It seems that when per is high it takes a too large amount of memory to calculate the model and I have a memory storage error. But I don't really understand why it takes more memory when per is high, as there is the same number of
2008 Apr 07
2
How to add background color of a 2D chart by quadrant
Hi,
I have a 2D chart that is divided into four quadrants, I, II, III, IV:
plot(1:10,ylim=c(0,10),xlim=c(0,10),type="n")
abline(v=5,h=5)
text(x=c(7.5,7.5,2.5,2.5),y=c(2.5,7.5,7.5,2.5),labels=c("I","II","III","IV"))
I would like to fill each quadrant with a background color unique to the
quadrant. Does anyone know how to do this in R?
Thanks,
--
2006 Oct 06
3
is it possible to fill with a color or transparency gradient?
Hi all,
Is there a way to fill a rectangle or polygon with a color and/or
transparency gradient? This would be extremely useful for me in terms
of adding some additional information to some plots I'm making,
especially if I could define the gradient on my own by putting
functions into rgb something like rgb( r=f(x,y), g=f(x,y), b=f(x,y),
alpha=f(x,y) ). Not so important whether the
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:
2003 May 20
1
Background color in plots.
How can i set the background color in a plot.
Eg. Instead of having with i like to have a grey background.
Eryk
[[alternate HTML version deleted]]
2007 Apr 27
2
Scatter Plot in R - Help
Dear All,
I am using the following commands to do the scatter
plot of two vectors, say X and Y.
plot(X,Y, col="blue")
abline(a=1,b=1, col="red")
abline(a=-1,b=1, col="green")
I would like to split the scatter plot into 3 part
with 3 different colors: (i) points lies between 2
lines, (ii) points above line 1, and (iii) points
below line 2. I am struggling to do
2007 Jan 24
2
modify rectangle color from image
Hi,
I need some suggestion on how I could modify the color on some
rectangle that I have created using "image".
In other words, I have a 5x5 matrix, say, m.
m <- matrix(rnorm(25), nrow=5)
I create a grid of rectangles by:
image(m)
Now I want to change the color of rectangle (3,3) to blue.
I don't know how this could be done, and searching the web has
2008 Aug 15
6
continuous coloring of a polygon
R2.7.1, WinXP
Hi,
I have a polygon inside a circle as follows:
radius <- 3
x <- seq(-radius,radius,length=2000)
y <- sqrt(radius^2-x^2)
xx <- c(x,-x)
yy <- c(y,-y)
plot(xx,yy, xlim=c(-radius,radius),ylim=c(-radius,radius), type="l",
ylab="", xlab="", axes=F)
radius <- 2.7
x1 <- seq(-radius,radius,length=2000)
y1 <- sqrt(radius^2-x1^2)
2012 Sep 23
1
Background color in a grid plot seems to interfere with plot()
Hi,
Why does the upper left panel (in the plot below) not have a gray background?
Cheers,
Marius
require(grid)
require(gridBase)
pdf(file="Rplot.pdf", width=8, height=8, onefile=FALSE)
## set up the grid layout
gl <- grid.layout(5, 5, widths=unit(c(1.8, 8, 0.8, 8, 0.8), "cm"),
heights=unit(c(0.8, 8, 0.8, 8, 1.5), "cm"))
if(FALSE) grid.show.layout(gl)
2001 May 20
2
legend() with xpd=T; omission of initial plot character (PR#943)
In the following:
plot(0:1, 0:1)
legend(x=0, y=1.2, pch=c(1,2), legend=c("May","June"))
the first plot character is omitted when plotting to
the screen.
I obtained the same behaviour when placing a legend
in the margin following use of pairs()
-please do not edit the information below--
Version:
platform = i386-pc-mingw32
arch = x86
os = Win32
system = x86, Win32
2010 Jun 02
4
Draw text with a box surround in plot.
text() can draw text on a plot.
Do we have a way/function to draw text with a box surround it?
Thanks,
-james
2006 Dec 08
1
missing factor levels in a lattice barchart panel cause unexpected failure
Hi all - I'm trying to generate lattice barchart graphs with missing
values, and came across the following:
This does not run. I would expect it to:
library(lattice)
D = data.frame(X=1, Y=factor(letters[2], letters[1:2]))
barchart(~ X, D, groups=Y)
Error in grid.Call.graphics("L_rect", x$x, x$y, x$width, x$height,
resolveHJust(x$just, :
invalid line type
which is simply
2006 Jan 14
2
change lattice panel background color
I can't find a way to change just the panel background color in lattice.
I would like NA regions in levelplot() to appear black. I've tried the
trellis.par.set() stuff, but it it makes the background of the whole
graphic black.
Thanks,
Scott Waichler
Pacific Northwest National Laboratory
scott.waichler _at _ pnl.gov
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
2000 Sep 02
4
colors for background and plotting area
Dear all,
I am trying to prepare some figures where I'd like the color of the plot region
(i.e., the area bounded by the axes) to be different from the margin area
(i.e., the area of the figure not within the axes region). I can use "bg" but
that changes the background of everything? How can I accomplish what I want?
Thanks,
Ramon
--
Ramón Díaz-Uriarte
Triana 47
28016 Madrid
2013 Feb 14
1
fill colour in grid
Dear all r-users,
I have this code below to draw two squares, small and big square. I would like to colour the small square with red and the big square with blue for example. I tried using polygon but fail. Thank you so much for your help.
par(mar=c(4,4,2,1.2),oma=c(0,0,0,0),xaxs="i", yaxs="i")
plot.new()
plot.window(xlim= c(0,8),
2023 Oct 15
2
Plot to a device and examine the plot?
On 15/10/2023 12:05 p.m., Shu Fai Cheung wrote:
> Let me clarify my question:
>
> plot.new()
> polygon(c(.5, .5, .75, .8), c(.25, .3, .4, .5))
>
> If the device is an on-screen device, can I check whether a particular area
> has anything drawn on it, or, to be precise, whether the color of a
> particular area has all pixels equal to the background color. That is, if
>
2002 Aug 06
1
polygon() draws non-transparent border, erase.screen draws non-transparent border (PR#1881)
# polygon ignores requests to have its border transparent, look at
par(bg="transparent")
plot(c(0, 3), 0:1)
polygon(c(0, 1, 1, 0), c(0, 0, 1, 1), border=NA, col = 0)
polygon(c(1, 2, 2, 1), c(0, 0, 1, 1), border="transparent", col = 0)
polygon(c(2, 3, 3, 2), c(0, 0, 1, 1), border=0, col = 0)
# a quick fix for erase.screen() is the following
erase.screen <-
function (n =
2006 Nov 14
1
alphachannel on pdf-device
Dear R users,
since R-2.4.0 I am not able any more to draw figures without
transparency after drawing one figure with alphachannel set lower than 100%.
For better unterstanding here a small example of my problem:
-----------------------------------------------
pdf(paste("test_alpha_rgb.pdf",sep=""), version="1.4")
plot(1:8, 1:8, type="n",