Skip to content

implement ECDF plot #92

@DYung26

Description

@DYung26

Feature Description

Implement support for ECDF (Empirical Cumulative Distribution Function) plots in PlotSense to expand plot type coverage and improve distribution analysis capabilities.

Problem Statement

Currently, PlotSense does not support ECDF plots, which limits users' ability to visualize cumulative distributions and understand percentiles or data spread effectively. Users must rely on external tools for this type of analysis.

Proposed Solution

Add ECDF as a supported plot type within the PlotGenerator and integrate it into the recommendation system.

Example Usage:

# How you envision using this feature
import plotsense as ps

# Your proposed API/usage
fig = ps.plotgen(df, suggestion={"plot_type": "ecdf", "variables": "age"})

# Optional grouped ECDF
fig = ps.plotgen(df, suggestion={"plot_type": "ecdf", "variables": "age, gender"})

Alternatives Considered

  • Using histograms or KDE plots alone (do not provide cumulative insight)
  • Relying on external libraries/tools (breaks PlotSense workflow consistency)

Benefits

  • For Data Scientists:

    • Enables clear visualization of cumulative distributions and percentiles
    • Complements existing KDE and histogram plots
  • For Analysts:

    • Easier interpretation of thresholds (e.g., proportion below a value)
    • Better decision-making support
  • For the Project:

    • Expands supported plot types
    • Improves recommendation engine capabilities
    • Aligns with standard statistical visualization practices

Implementation Ideas

Affected Components:

  • Recommendation Engine
  • Plot Generator
  • Explanation System
  • Web Interface
  • Documentation
  • Tests
  • Other: Suggestion schema / plot registry

Potential Challenges:

  • Handling large datasets efficiently
  • Supporting grouped ECDF cleanly
  • Maintaining consistency with existing plot APIs

Mockups/Examples

Example using seaborn:

import seaborn as sns
sns.ecdfplot(data=df, x="age")

Additional Context

ECDF plots are widely used in statistical analysis and provide complementary insights to existing distribution plots such as histograms and KDE.

Would you like to work on this?

  • Yes, I'd like to contribute this feature
  • No, but I'm happy to help test it
  • Just suggesting the idea

Related Features/Issues

Related to # (KDE plot issue)

Checklist

  • I have searched existing issues/PRs for similar feature requests
  • I have provided a clear use case for this feature
  • I have considered how this fits with PlotSense's mission
  • I have provided example usage code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions