Alpha parameter doesn’t work on geom_rect!!! Sort of…

The parameter alpha in the R package ggplot2 is used to express the transparency of the fill colour of the function geom_

However for the function geom_rect it might not work as aspected.

In my latest work, I tried to combine different geom function but I was stuck when all was covered when I used geom_rect.
Let’s see an example:

library("dplyr")
library("ggplot2")
df = 
  data.frame(
    x = c(rep(1, 25), rep(2, 25), rep(3, 25)),
    y = c(sample(1:50, 25), sample(51:100, 25), sample(101:150, 25)),
    classes = c(rep("A", 25), rep("B", 25), rep("C", 25)))

head(df)
#  x  y classes
#1 1 45       A
#2 1  4       A
#3 1 41       A
#4 1 32       A
#5 1  8       A
36 1 14       A

If we plot the data using geom_jitter and geom_boxplot we obtain the plot:

ggplot(data = df,
       aes(x = x, y = y, colour = classes)) + 
  geom_jitter() +
  geom_boxplot(alpha = 0.2) +
  theme_minimal()
Continue reading “Alpha parameter doesn’t work on geom_rect!!! Sort of…”

More Than Happiness: Buddhist and Stoic Wisdom for a Sceptical Age

In the book “More Than Happiness: Buddhist and Stoic Wisdom for a Sceptical Age” the author Antonia Macaro offers a detailed comparison between two ancient philosophic and life inspiring practice: Stoicism and Buddhism.

Review

In the book “More Than Happiness: Buddhist and Stoic Wisdom for a Sceptical Age” the author Antonia Macaro offers a detailed comparison between two ancient philosophic and life inspiring practice: Stoicism and Buddhism.

In my experience, when the first is mentioned or discussed the second is usually brought up. After reading this book It is clear to me, how the two philosophy offer similar solutions for how to tackle day-to-day. Although, those solution come from traditions and sensibilities way different.

Continue reading “More Than Happiness: Buddhist and Stoic Wisdom for a Sceptical Age”