Add interactivity for geom_pcp
Open
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Description
It would be elegant to be able to create interactive parallel coordinate plots with plotly layered on the ggpcp library. Users should be able to select a line (or lines) and the entire line would highlight.
library(ggplot2)
data(mtcars)
mtcars_pcp <- mtcars |>
dplyr::mutate(
cyl = factor(cyl),
vs = factor(vs),
am = factor(am),
gear = factor(gear),
carb = factor(carb)
) |>
pcp_select(1:11) |> # select everything
pcp_scale() |>
pcp_arrange()
base <- mtcars_pcp |> ggplot(aes_pcp())
# Just the base plot:
base + geom_pcp()
# Ideally this would allow lines to be selected
ggplotly()
# Or something like:
highlight_key(mtcars) |> ... (ggplot2 code) |> ggplotly()
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the geom_pcp and ggplotly entry points described in the issue, and compare the proposed highlight_key approach with the ggpcp pipeline using pcp_select, pcp_scale, and pcp_arrange. Done means a parallel coordinate plot supports selecting one or more lines and highlights the entire selected line interactively.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- plotly, r
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100