ggplotly: geom_path interpretation of size
Open
Nobody has claimed this yet.
bug
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Description
For a visualization I'm making thick curves as follows:
require(ggplot2)
require(plotly)
require(Hmisc)
len=100
edge=data.frame(bezier(x=c(0, 1, 2), y=c(0, 1, 0),evaluation = len))
edge$Sequence <- sin( seq(0,pi,length.out=len) )
gg = ggplot(edge,aes(x = x, y = y, size = Sequence)) + geom_path() + scale_size( range = c(.3, 20), guide = F) + theme_bw(base_size = 16) + ylim(0,.6) + scale_alpha(guide=F)
pl <- ggplotly(gg)
which in ggplot2 gives:

but which with ggplotly
pl <- ggplotly(gg)
gives

I think the problem is that ggplotly is assuming every different "size" should be considered as a separate path, whereas ggplot2 is not.
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
Reproduce the supplied R example using ggplotly and compare its geom_path rendering with ggplot2. Trace how ggplotly interprets the varying size aesthetic for the path; done means the curve remains one continuous path and matches the ggplot2 result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100