Telegram Group & Telegram Channel
On bubbles and trees 💫

Teun van den Brand делает просто волшебные дополнения к ggplot2, в частности, библиотека {legendry} теперь позволяет делать пузырьковые легенды для графиков.


library(legendry)

gapminder::gapminder |>
dplyr::filter(year == max(year)) |>
ggplot(aes(gdpPercap, lifeExp, size = pop,
fill = continent)) +
geom_point(pch = 21, alpha = 0.8) +
scale_size_area(
limits = c(0, NA), max_size = 20,
breaks = c(0, 100, 500, 1000)*1e6,
labels = c(0, "100M", "500M", "1B"),
guide = guide_circles(vjust = 1)
) +
scale_fill_discrete(guide =
guide_legend(override.aes =
list(size = 4, alpha = 0.8))) +
scale_x_log10() +
labs(
x = "ВВП на душу населения",
y = "Ожидаемая продолжительность жизни",
fill = "Континент",
size = "Население"
)


Это должно быть по умолчанию в {ggplot2}!



group-telegram.com/naukaidannye/707
Create:
Last Update:

On bubbles and trees 💫

Teun van den Brand делает просто волшебные дополнения к ggplot2, в частности, библиотека {legendry} теперь позволяет делать пузырьковые легенды для графиков.


library(legendry)

gapminder::gapminder |>
dplyr::filter(year == max(year)) |>
ggplot(aes(gdpPercap, lifeExp, size = pop,
fill = continent)) +
geom_point(pch = 21, alpha = 0.8) +
scale_size_area(
limits = c(0, NA), max_size = 20,
breaks = c(0, 100, 500, 1000)*1e6,
labels = c(0, "100M", "500M", "1B"),
guide = guide_circles(vjust = 1)
) +
scale_fill_discrete(guide =
guide_legend(override.aes =
list(size = 4, alpha = 0.8))) +
scale_x_log10() +
labs(
x = "ВВП на душу населения",
y = "Ожидаемая продолжительность жизни",
fill = "Континент",
size = "Население"
)


Это должно быть по умолчанию в {ggplot2}!

BY Наука и данные




Share with your friend now:
group-telegram.com/naukaidannye/707

View MORE
Open in Telegram


Telegram | DID YOU KNOW?

Date: |

He floated the idea of restricting the use of Telegram in Ukraine and Russia, a suggestion that was met with fierce opposition from users. Shortly after, Durov backed off the idea. And while money initially moved into stocks in the morning, capital moved out of safe-haven assets. The price of the 10-year Treasury note fell Friday, sending its yield up to 2% from a March closing low of 1.73%. Perpetrators of these scams will create a public group on Telegram to promote these investment packages that are usually accompanied by fake testimonies and sometimes advertised as being Shariah-compliant. Interested investors will be asked to directly message the representatives to begin investing in the various investment packages offered. The S&P 500 fell 1.3% to 4,204.36, and the Dow Jones Industrial Average was down 0.7% to 32,943.33. The Dow posted a fifth straight weekly loss — its longest losing streak since 2019. The Nasdaq Composite tumbled 2.2% to 12,843.81. Though all three indexes opened in the green, stocks took a turn after a new report showed U.S. consumer sentiment deteriorated more than expected in early March as consumers' inflation expectations soared to the highest since 1981. "The result is on this photo: fiery 'greetings' to the invaders," the Security Service of Ukraine wrote alongside a photo showing several military vehicles among plumes of black smoke.
from br


Telegram Наука и данные
FROM American