Reputation: 543
I toying around with a parallel coordinate plot using the GGally package and ggparcoord. And I have added different point shapes, but I'd like to change the size of the shapes separately from the size of the connecting lines.
From the help ggplot2's aes
can be used to change size, but I can't figure out how to separate linewidth from point size.
ggparcoord(
iris,
columns = 1:4,
groupColumn = 5,
scale = "std",
showPoints = TRUE,
mapping = ggplot2::aes(size = 1.25, shape = factor(Species))
) + ggplot2::scale_size_identity()
Upvotes: 1
Views: 28
Reputation: 3943
You can add a linewidth
argument to the aes()
that you pass to mapping
, and add a scale_linewidth_identity()
to the plot in the same way that you did for the point size. For example:
ggparcoord(
iris,
columns = 1:4,
groupColumn = 5,
scale = "std",
showPoints = TRUE,
mapping = ggplot2::aes(size = 1.25, linewidth = 0.5, shape = factor(Species))
) +
ggplot2::scale_size_identity() +
ggplot2::scale_linewidth_identity()
Upvotes: 2