Vous souhaitez partager votre contenu sur R-bloggers ? cliquez ici si vous avez un blog, ou ici si vous n’en avez pas.

Ce merveilleux article de Jonathan Caroll me donne une idée pour jouer avec le code ggplot2 et les palettes de couleurs scico :
Voir aussi ce toot de Stefan Siegert, inspirant !
J’ai pris le code du toot mentionné ci-dessus, je l’ai modifié et je l’ai utilisé pour m’amuser un peu en créant des graphiques qui ressemblent à des peintures avec des imperfections sur les bords, entre autres.
Dans l’ensemble, je pense que c’est un bon moyen de tester les palettes de couleurs.
Lorsque vous obtenez des images en points par pouce plus élevées, cela peut être vraiment cool.
#
library(tidyverse)
crossing(x=0:10, y=x) |>
mutate(dx = rnorm(n(), 0, (y/20)^1.5),
dy = rnorm(n(), 0, (y/20)^1.5)) |>
ggplot() +
geom_tile(aes(x=x+dx, y=y+dy, fill=y), colour="black",
lwd=2, width=1, height=1, alpha=0.8, show.legend=FALSE) +
scale_fill_gradient(high="#9f025e", low='#f9c929') +
scale_y_reverse() + theme_void()
library(tidyverse)
crossing(x=8:300, y=x[1:100]) |>
mutate(dx = rnorm(n(), 0, (y/200)^1.5),
dy = rnorm(n(), 0, (y/100)^1.5)) |>
ggplot() +
geom_tile(aes(x=x+dx, y=y+dy, fill=y), colour=NA,
lwd=4, width=8, height=4, alpha=0.1,
show.legend=FALSE) +
scale_fill_gradient(high="#9f025e", low='#f9c929') +
scale_y_reverse() + theme_void() +
coord_fixed()


Voici la palette de couleurs « Oléron » de chez scico. Quelle belle palette pour ceux qui connaissent cette île française !
library(tidyverse)
crossing(x=8:300, y=x[1:100]) |>
mutate(dx = rnorm(n(), 0, (y/200)^1.5),
dy = rnorm(n(), 0, (y/100)^1.5)) |>
ggplot() +
geom_tile(aes(x=x+dx, y=y+dy, fill=y), colour=NA,
lwd=4, width=8, height=4, alpha=0.1,
show.legend=FALSE) +
scico::scale_fill_scico(palette = "oleron",
direction = 1) +
scale_y_reverse() + theme_void() +
coord_fixed()


Dessinant maintenant les vagues, vue en haut de la dune :
crossing(x=8:300, y=x[1:100]) |>
mutate(dx = rnorm(n(), 0, (y/200)^1.5),
dy = ifelse(y < 52,
rnorm(n(), 0, (y/100)^1.5)+
ifelse(x %% 2 == 0,
cos(x * 3 + y / 5)*4 +
sin(x * 3 + y / 2)*2, 0) / 1.7,
rnorm(n(), 0, (y/100)^1.5))) |>
ggplot() +
geom_tile(aes(x=x+dx, y=y+dy, fill=y), colour=NA,
lwd=4, width=8, height=4, alpha=0.2,
show.legend=FALSE) +
scico::scale_fill_scico(palette = "oleron", #begin = 0.6,
direction = 1) +
scale_y_reverse() + theme_void() +
coord_fixed()
Le vert pourrait être la végétation des dunes, ou peut-être des algues. Le bleu pourrait aussi être le ciel et le vent, l’heure bleue, il y a bien du sable.


Retour à des rectangles plus grands avec une palette scico cyclique : romaO.
crossing(x=1:280, y=x) |>
mutate(dx = rnorm(n(), 0, (x/40)^1.5),
dy = rnorm(n(), 0, (y/40)^1.5)) |>
ggplot() +
geom_tile(aes(x=x+dx, y=y-dy*3, fill=y), colour="white",
lwd=0.03, width=13, height=6, alpha=0.4,
show.legend=FALSE) +
scico::scale_fill_scico(palette = "romaO", #begin = 0.6,
direction = 1) +
scale_y_reverse() + theme_void() +
theme(panel.background = element_rect(fill = "#2b2828")) +
coord_fixed()


Maintenant, jouez avec un peu plus de magie : coord_polar
crossing(x=1:280, y=x) |>
mutate(dx = rnorm(n(), 0, (x/40)^1.5),
dy = rnorm(n(), 0, (y/40)^1.5)) |>
ggplot() +
geom_tile(aes(x=x+dx, y=y-dy*3, fill=y), colour="white",
lwd=0.03, width=13, height=6, alpha=0.4,
show.legend=FALSE) +
scico::scale_fill_scico(palette = "romaO", #begin = 0.6,
direction = 1) +
scale_y_reverse() + theme_void() +
theme(panel.background = element_rect(fill = "#2b2828")) +
coord_polar()


Un autre avec vikO palette:
crossing(x=8:70, y=x[1:30]) |>
mutate(dx = rnorm(n(), 0, (y/20)^1.5),
dy = rnorm(n(), 0, (y/10)^1.5)+ ifelse(x %%2 == 0, cos(x * 3 + y / 5)*10, 0)) |>
ggplot() +
geom_tile(aes(x=x+dx, y=y+dy, fill=y), colour="grey70",
lwd=0.1, width=8, height=4, alpha=0.6,
show.legend=FALSE) +
scico::scale_fill_scico(palette = "vikO", #begin = 0.6,
direction = -1) +
scale_y_reverse() +
theme_void() +
theme(panel.background = element_rect(fill = "#2b2828")) +
coord_polar(theta = "x")


Enfin revenons à la palette Oléron avec coord_polar :
crossing(x=8:70, y=x[1:30]) |>
mutate(dx = rnorm(n(), 0, (y/20)^1.5),
dy = rnorm(n(), 0, (y/10)^1.5)+ ifelse(x %%2 == 0, cos(x * 3 + y / 5)*10, 0)) |>
ggplot() +
geom_tile(aes(x=x+dx, y=y+dy, fill=y), colour=NA,
lwd=1, width=8, height=4, alpha=0.4,
show.legend=FALSE) +
scico::scale_fill_scico(palette = "oleron", #begin = 0.6,
direction = 1) +
scale_y_reverse() +
theme_void() +
theme(panel.background = element_rect(fill = "grey5")) + ##2b2828
coord_polar(theta = "x")
Un peu comme la Terre, mais pas depuis la Lune. Juste de R.


bukavu palette:
crossing(x=8:70, y=x[1:30]) |>
mutate(dx = rnorm(n(), 0, (y/20)^1.5),
dy = rnorm(n(), 0, (y/10)^1.5)+ ifelse(x %%2 == 0, cos(x * 3 + y / 5)*10, 0)) |>
ggplot() +
geom_tile(aes(x=x+dx, y=y+dy, fill=y), colour="grey5",
lwd=0.2, width=8, height=4, alpha=0.4,
show.legend=FALSE) +
scico::scale_fill_scico(palette = "bukavu", #begin = 0.6,
direction = 1) +
scale_y_reverse() +
theme_void() +
theme(panel.background = element_rect(fill = "#2b2828")) +
coord_polar(theta = "x")


Un grand merci à :
En rapport
PakarPBN
A Private Blog Network (PBN) is a collection of websites that are controlled by a single individual or organization and used primarily to build backlinks to a “money site” in order to influence its ranking in search engines such as Google. The core idea behind a PBN is based on the importance of backlinks in Google’s ranking algorithm. Since Google views backlinks as signals of authority and trust, some website owners attempt to artificially create these signals through a controlled network of sites.
In a typical PBN setup, the owner acquires expired or aged domains that already have existing authority, backlinks, and history. These domains are rebuilt with new content and hosted separately, often using different IP addresses, hosting providers, themes, and ownership details to make them appear unrelated. Within the content published on these sites, links are strategically placed that point to the main website the owner wants to rank higher. By doing this, the owner attempts to pass link equity (also known as “link juice”) from the PBN sites to the target website.
The purpose of a PBN is to give the impression that the target website is naturally earning links from multiple independent sources. If done effectively, this can temporarily improve keyword rankings, increase organic visibility, and drive more traffic from search results.