Skip to content

Error when using stat='summary' if the data contains NaN values. #1301

Closed
@EArkhipova-HORIS

Description

@EArkhipova-HORIS

In Lets-Plot v4.5.2, error message appears when using stat='summary' in geom_bar() with data containing NaN values.

Example:

from lets_plot import *
import numpy as np
LetsPlot.setup_html()

data = {
    'x': ['a', 'b'],
    'y': [np.nan, 5.0]
}

ggplot() + geom_bar(aes(x='x', y='y', fill='x'), stat='summary', data=data)

This code will give an error message instead of the plot:

"All data series in data frame must have equal size ..x.. : 1 ..y.. : 1 ..count.. : 0 ..density.. : 0 ..ymin.. : 1 ..ymax.. : 1 ..sample.. : 0 ..theoretical.. : 0 ..se.. : 0 ..level.. : 0 ..n.. : 0 ..quantile.. : 0 ..lower.. : 0 ..middle.. : 0 ..upper.. : 0 ..width.. : 0 ..height.. : 0 ..binwidth.. : 0 ..violinwidth.. : 0 ..sum.. : 0 ..prop.. : 0 ..proppct.. : 0 ..sumprop.. : 0 ..sumpct.. : 0 ..scaled.. : 0 ..group.. : 0 x : 1 y : 1"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions