1*x + intercept_1 + 1/w[2]), fill = "yellow", alpha=0.1)
>
> Cheers
> Petr
>
> > -Original Message-
> > From: Luigi Marongiu
> > Sent: Friday, October 23, 2020 3:30 PM
> > To: PIKAL Petr
> > Cc: r-help
> > Subject: Re: [R] How to shade area b
Friday, October 23, 2020 3:30 PM
> To: PIKAL Petr
> Cc: r-help
> Subject: Re: [R] How to shade area between lines in ggplot2
>
> Thank you, but this split the area into two and distorts the shape of the
> plot.
> (compared to ``` p + geom_abline(slope = slope_1, intercept
Hello,
What about this?
straightline <- function(x, slope, intercept) slope*x + intercept
p <- ggplot(data = trainset, aes(x=x, y=y, color=z)) +
geom_point() +
geom_ribbon(aes(ymin = straightline(x, slope_1, intercept_1 + 1/w[2]),
ymax = straightline(x, slope_1, intercept
min = slope_1*x + intercept_1 - 1/w[2],
> ymax = slope_1*x + intercept_1 + 1/w[2], fill = "grey70", alpha=0.1))
>
> Cheers
> Petr
>
> > -Original Message-
> > From: Luigi Marongiu
> > Sent: Friday, October 23, 2020 11:11 AM
> > To: PIKAL P
o: PIKAL Petr
> Cc: r-help
> Subject: Re: [R] How to shade area between lines in ggplot2
>
> also from this site: https://plotly.com/ggplot2/geom_ribbon/
> I get the answer is geom_ribbon but I am still missing something ``` #! plot
> p
> = ggplot(data = trainse
n-lines-using-g
> gplot-in-r
>
> Cheers
> Petr
>
> > -Original Message-
> > From: R-help On Behalf Of Luigi Marongiu
> > Sent: Friday, October 23, 2020 9:59 AM
> > To: r-help
> > Subject: [R] How to shade area between lines in ggplot2
> >
>
inal Message-
> > From: R-help On Behalf Of Luigi Marongiu
> > Sent: Friday, October 23, 2020 9:59 AM
> > To: r-help
> > Subject: [R] How to shade area between lines in ggplot2
> >
> > Hello,
> > I am running SVM and showing the results with ggplot2.
n-lines-using-g
> gplot-in-r
>
> Cheers
> Petr
>
> > -Original Message-
> > From: R-help On Behalf Of Luigi Marongiu
> > Sent: Friday, October 23, 2020 9:59 AM
> > To: r-help
> > Subject: [R] How to shade area between lines in ggplot2
> >
M
> To: r-help
> Subject: [R] How to shade area between lines in ggplot2
>
> Hello,
> I am running SVM and showing the results with ggplot2. The results include
> the decision boundaries, which are two dashed lines parallel to a solid
line. I
> would like to remove the dash
Hello,
I am running SVM and showing the results with ggplot2. The results
include the decision boundaries, which are two dashed lines parallel
to a solid line. I would like to remove the dashed lines and use a
shaded area instead. How can I do that?
Here is the code I wrote..
```
library(e1071)
lib
10 matches
Mail list logo