ggplot2 provides a very elegant way to describe graphics. In this example, we will use its grammar to show how the parallel plot and the radar plots are related.

Our example relies on the mtcars dataset. We need first to rescale all the coordinates within \(0\) and \(1\) and to melt the dataset in order to plot it easily with ggplot.

mtcarsscaled <-, ggplot2:::rescale01))
mtcarsscaled$model <- rownames(mtcars)
mtcarsmelted <- reshape2::melt(mtcarsscaled)

We can now use ggplot and its geom_path geometry to obtain a single parallel plot

ggplot(mtcarsmelted, aes(x = variable, y = value)) +
  geom_path(aes(group = model, color = model), size = 2) +
  theme(strip.text.x = element_text(size = rel(0.8)),
        axis.text.x = element_text(size = rel(0.8)),
        axis.ticks.y = element_blank(),
        axis.text.y = element_blank()) +
  xlab("") + ylab("") +
  guides(color = guide_legend(ncol=2))