feat: add ECDF plot visualization operator#4406
Merged
Merged
Conversation
Contributor
|
@gracecluvohio please review it. After that, @mengw15 can review it as a committer. |
- Rename "facets" to "subplots" in SeparateBy Column description
- Expand CDF Mode description with formulas for each mode
(standard / reversed / complementary)
- Replace technical term "ECDF trace" with "ECDF line" in Show Markers
- Remove Show Lines field: ECDF is inherently a step-line plot, and the points-only rendering was not a meaningful configuration. This also eliminates the confusing fallback where lines were still drawn when both Show Lines and Show Markers were off.
Contributor
Author
|
@mengw15 I have finished what Grace asked me to revise. Could you please review it for finalization? |
Contributor
Please make sure all conversations are marked resolved if you resolve them, and @gracecluvohio please take a look of the changes. I will review after Grace's approval |
Contributor
|
LGTM! @mengw15 please take a look. |
gracecluvohio
approved these changes
Apr 20, 2026
mengw15
requested changes
Apr 20, 2026
Contributor
|
remember to run scalafmtAll for formatting checks. |
Contributor
|
Please update the link of the test csv file in the PR description, it seems not working right now |
mengw15
reviewed
Apr 20, 2026
- Use OperatorInfo.forVisualization(...) helper instead of constructing OperatorInfo manually, matching other visualization operators - Rename the empty-string option in the Marginal Plot enum to "none" for clarity, and update the conditional check accordingly - Drop the now-unused showLines assertion from ECDFPlotOpDescSpec(the field was removed in the previous commit)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description
Purpose
Adds a new Empirical Cumulative Distribution Function (ECDF) plot operator to the Statistical Visualization group, letting users visualize the cumulative distribution of a numeric column and easily compare distributions across groups.
Summary
New operator
ECDFPlotOpDescunderoperator/visualization/ecdfPlot/, rendered viaplotly.express.ecdf.Configurable fields:
probability/count/sumstandard/reversed/complementaryvertical/horizontal""/histogram/rugRegistered in
LogicalOp.scalaas theECDFPlotoperator type.Added operator icon
frontend/src/assets/operator_images/ECDFPlot.png.User-provided enum fields (
cdfMode,orientation,marginal) useEncodableStringso generated Python safely passesPythonCodeRawInvalidTextSpec.Unit tests in
ECDFPlotOpDescSpeccovering the empty-value assertion and the generated figure with all optional parameters.Test
sbt scalafmtCheckAllpassessbt "scalafixAll --check"passessbt "WorkflowOperator/testOnly org.apache.texera.amber.operator.visualization.ecdfPlot.ECDFPlotOpDescSpec org.apache.texera.amber.util.PythonCodeRawInvalidTextSpec"— all tests pass (4/4), 110/110 raw-invalid OK, 110/110 py_compile OK
Screenshots