Skip to content

Uncorrect behavior of error_y with grouped Y values #1110

Open
@Cristoforetti

Description

@Cristoforetti

I've got some problems plotting an std deviation of some value Y grouped by a factor G,here's the df

df<-data.frame("X"=c(1:20),"Y"=c(1:20),"SD"=c(1:20),"G"=c(rep("A",3),rep("B",5),rep("C",4),rep("D",5),rep("A",3)))

If I plot the value and the sd without grouping them everything is OK:

p3<-plot_ly(df,
x=~X,
y=~Y,
type="scatter",
mode="markers",
marker=list(symbol="x"),
error_y =list(
    array=~SD,
    thickness=1
    )
)
p3

This yields the following plot:

But when i try to plot Y+SD grouped by G the SD appears not in the correct order. See the resulting plot below:

p3<-plot_ly(df,
    x=~X,
    y=~Y,
    color=~G,
    type="scatter",
    mode="markers",
    marker=list(symbol="x"),
    error_y =list(array=~SD,
                  thickness=1
    )
)
p3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions