Skip to content

For ggplotly: implement lineend = "square" for geom_segment #625

Open
@talgalili

Description

@talgalili

Example code:

library(ggplot2)
b <- ggplot(mtcars, aes(wt, mpg)) 
df <- data.frame(x1 = c(2.62, 2.62), x2 = c(3.57,2.62), y1 = c(21,21), y2 = c(21, 16))
b + geom_segment(aes(x = x1, y = y1, xend = x2, yend = y2, colour = "segment"), data = df, size = 2, lineend = "square")

library(plotly)
ggplotly()

Here is how the corner looks in ggplots2:
image

And in ggplotly:

image

Notice the "notch" in the corner...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions