Displaying 20 results from an estimated 20 matches for "adjustcolor".
2018 May 31
2
How to alpha entire plot?
I have two chromatograms I want plotted on the same axes.
I would like the plots to be transparent, so the first chart is
not obscured.
I have tried adjustcolor(..., alpha.f=0.3), the problem is that
my chromatogram is so dense with datapoints that they
overlap and the entire graph just ends up a solid color. The
second histogram still obscures the first.
Consider this example:
col1 <- adjustcolor("red", alpha.f=0.3)
col2 <- adjustcolor...
2024 Jul 16
2
Automatic Knot selection in Piecewise linear splines
...of xx <- seq(x[1], x[length(x)], length.out = 1024)
rnx <- extendrange(x) ## to extrapolate a bit
xx <- do.call(seq.int, c(rnx, list(length.out = 1200)))
cbind(f = f(xx),
sspl = predict(m.sspl, xx)$y,
mars = predict(fm1, xx)) -> fits
plot(x,y, xlim=rnx, cex = 1/4, col = adjustcolor(1, 1/2))
cols <- c(adjustcolor(2, 1/3),
adjustcolor(4, 2/3),
adjustcolor("orange4", 2/3))
lwds <- c(3, 2, 2)
matlines(xx, fits, col = cols, lwd = lwds, lty=1)
legend("topleft", c("true f(x)", "smooth.spline()", "earth()"),...
2024 Jul 26
1
Automatic Knot selection in Piecewise linear splines
...gth.out = 1024)
> rnx <- extendrange(x) ## to extrapolate a bit
> xx <- do.call(seq.int, c(rnx, list(length.out = 1200)))
>
> cbind(f = f(xx),
> sspl = predict(m.sspl, xx)$y,
> mars = predict(fm1, xx)) -> fits
>
> plot(x,y, xlim=rnx, cex = 1/4, col = adjustcolor(1, 1/2))
> cols <- c(adjustcolor(2, 1/3),
> adjustcolor(4, 2/3),
> adjustcolor("orange4", 2/3))
> lwds <- c(3, 2, 2)
> matlines(xx, fits, col = cols, lwd = lwds, lty=1)
> legend("topleft", c("true f(x)", "smooth.spline...
2024 Jul 09
1
Automatic Knot selection in Piecewise linear splines
How can I do automatic knot selection while fitting piecewise linear
splines to two variables x and y? Which package to use to do it simply? I
also want to visualize the splines (and the scatter plot) with a graph.
Anupam
[[alternative HTML version deleted]]
2023 Jul 23
2
col2rgb() function
Thanks That works nicely Nick
On Sun, 23 Jul 2023 at 19:26, Ben Bolker <bbolker at gmail.com> wrote:
> Does adjustcolor() help?
>
> cb8<- c("#000000", "#E69F00", "#56B4E9", "#009E73","#F0E442", "#0072B2",
> "#D55E00", "#CC79A7")
> plot(0,0,xlim=c(1,8),ylim=c(0,1))
> points(1:8,rep(0.5,8),col=cb8,pch=19,cex=2)
> p...
2023 Jul 23
1
col2rgb() function
Does adjustcolor() help?
cb8<- c("#000000", "#E69F00", "#56B4E9", "#009E73","#F0E442", "#0072B2",
"#D55E00", "#CC79A7")
plot(0,0,xlim=c(1,8),ylim=c(0,1))
points(1:8,rep(0.5,8),col=cb8,pch=19,cex=2)
points(1:8,rep(0.75,8),col=adj...
2023 Jul 23
1
col2rgb() function
...ry
Utah State University
8200 Old Main Hill
Logan, UT 84322-8200
david.stevens at usu.edu
(435) 797-3229 (office)
On 7/23/2023 1:00 PM, Nick Wray wrote:
> Thanks That works nicely Nick
>
> On Sun, 23 Jul 2023 at 19:26, Ben Bolker <bbolker at gmail.com> wrote:
>
>> Does adjustcolor() help?
>>
>> cb8<- c("#000000", "#E69F00", "#56B4E9", "#009E73","#F0E442", "#0072B2",
>> "#D55E00", "#CC79A7")
>> plot(0,0,xlim=c(1,8),ylim=c(0,1))
>> points(1:8,rep(0.5,8),col=cb8...
2018 Jun 01
0
How to alpha entire plot?
...type = "h")
Cheers,
B.
> On 2018-05-31, at 16:56, Ed Siefker <ebs15242 at gmail.com> wrote:
>
> I have two chromatograms I want plotted on the same axes.
> I would like the plots to be transparent, so the first chart is
> not obscured.
>
> I have tried adjustcolor(..., alpha.f=0.3), the problem is that
> my chromatogram is so dense with datapoints that they
> overlap and the entire graph just ends up a solid color. The
> second histogram still obscures the first.
>
> Consider this example:
>
>
> col1 <- adjustcolor("red&qu...
2023 Jul 23
1
col2rgb() function
...alette.colors(8, alpha = 0.3)
or more explicitly
palette.colors(8, palette = "Okabe-Ito", alpha = 0.3)
On Sun, 23 Jul 2023, Nick Wray wrote:
> Thanks That works nicely Nick
>
> On Sun, 23 Jul 2023 at 19:26, Ben Bolker <bbolker at gmail.com> wrote:
>
>> Does adjustcolor() help?
>>
>> cb8<- c("#000000", "#E69F00", "#56B4E9", "#009E73","#F0E442", "#0072B2",
>> "#D55E00", "#CC79A7")
>> plot(0,0,xlim=c(1,8),ylim=c(0,1))
>> points(1:8,rep(0.5,8),col=cb8,...
2019 Mar 15
1
Could we make filled.contour() more suitable for PDF viewers?
Note that I sent this to r-devel, yesterday.
However, it didn't appear on the mailing list.
So, I'm resending it.
Today, I plotted the following:
> filled.contour (,,z, color.palette=terrain.colors)
It looked OK, in R.
However, when I created a PDF document, the plot (and other similar plots)
had grid (and other) lines in it, that shouldn't be there.
Note that this problem is more
2023 Jul 23
2
col2rgb() function
Hello I have a palette vector of colour blind colours (in hexadecimal)
which I?m using for plots, but they are not see-through, and as I wanted to
overlay some histograms I wanted to convert these colours to rgb, when you
can set the opacity.
I have found the function col2rgb(), which works in the sense that it gives
a vector of numbers but these don?t work directly in rgb because they are
too
2016 Apr 28
1
polygon angle option perpendicular to axis
...op = 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 = adjustcolor("#33a02c",alpha.f = 0.7) ,border = "#33a02c", lty = 4, density = 80, angle = 180)
I would like the hatched lines to all go in the same direction (parallel to the x-axis) so that I can layer another polygon on top with perpendicular hatches and you will be able to differentiate...
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
2018 Apr 16
2
alpha transparency doesn't work for lines when xpd=TRUE
Dear R-devel,
I think I've found a bug - the alpha transparency doesn't work when plotting lines with xpd = TRUE.
#works
plot(1:20, col="#1874CD", xpd=T, type="l")
#works
plot(1:20, col="#1874CD50", xpd=F, type="l")
#doesn't work
plot(1:20, col="#1874CD50", xpd=T, type="l")
Thank you.
Jim
[[alternative HTML version
2017 May 30
2
stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3
...p 4
R <- if(n == 2) 2L else 3L
slope <- (m_y[[R]] - m_y[[1]]) / (m_x[[R]] - m_x[[1]])
intercept <- m_y[[1]] - slope * m_x[[1]]
## Step 5
mid_y <- intercept + slope * m_x[[2]]
intercept <- intercept + (m_y[[2]] - mid_y) / 3
if(plot.) abline(a = intercept, b = slope, col=adjustcolor("midnight blue", .5), lwd=2)
c(intercept = intercept, slope = slope)
}
## To test it, here's the second example from that page:
dfr <- data.frame(
time = c( .16, .24, .25, .30, .30, .32, .36, .36, .50, .50,
.57, .61, .61, .68, .72, .72,...
2011 Apr 13
3
latex, eps graphics and transparent colors
I have a diagram to be included in latex, where all my figures are .eps
graphics (so pdflatex is not an
option) and I want to achieve something
like the following: three concentric filled circles varying in lightness
or saturation. It is easiest to do this using
transparency, but in my test using the postscript driver, the
transparent color fills do not appear. Is it
correct that postscript()
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?
2017 May 29
3
stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3
Here is an attached patch.
Best,
Serguei.
Le 29/05/2017 ? 12:21, Serguei Sokol a ?crit :
> The problem or actual R implementation relies on an assumption
> that median(x[i] | x[i] <= quantile(x, 1/3)) == quantile(x, 1/6)
> which reveals not to be true despite very trustful appearance.
>
> If we continue with the example of x=y=1:9
> then quantile(x, 1/6)=2.5 (here quantile()
2010 Oct 15
0
R 2.12.0 is released
...ather than the previous default of
na.omit.
Predictions from "loess" fits are now named from the row names of
newdata.
? Parsing errors detected during Sweave() processing will now be
reported referencing their original location in the source file.
? New adjustcolor() utility, e.g., for simple translucent color
schemes.
? qr() now has a trivial lm method with a simple (fast) validity
check.
? An experimental new programming model has been added to package
methods for reference (OOP-style) classes and methods. See
?ReferenceCl...
2010 Oct 15
0
R 2.12.0 is released
...ather than the previous default of
na.omit.
Predictions from "loess" fits are now named from the row names of
newdata.
? Parsing errors detected during Sweave() processing will now be
reported referencing their original location in the source file.
? New adjustcolor() utility, e.g., for simple translucent color
schemes.
? qr() now has a trivial lm method with a simple (fast) validity
check.
? An experimental new programming model has been added to package
methods for reference (OOP-style) classes and methods. See
?ReferenceCl...