Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECDF Stat #832

Merged
merged 17 commits into from
Aug 2, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Specify limits for the stat_ecdf() function.
  • Loading branch information
ASmirnov-HORIS committed Jul 28, 2023
commit 49a8b210ce121aab400269a5eb8238cdeb0de6c8
8 changes: 7 additions & 1 deletion python-package/lets_plot/plot/stat.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright (c) 2023. JetBrains s.r.o.
# Use of this source code is governed by the MIT license that can be found in the LICENSE file.
from .geom import _geom
from .scale_convenience import xlim, ylim

#
# Stats - functions, drawing attention to the statistical transformation rather than the visual appearance.
Expand Down Expand Up @@ -352,6 +353,10 @@ def stat_ecdf(mapping=None, *, data=None, geom=None,
**other_args):
ecdf_geom = geom if geom is not None else 'step'
ecdf_pad = pad if pad is not None else True
if orientation == 'y':
limits_spec = xlim(0, 1)
else:
limits_spec = ylim(0, 1)
return _geom(ecdf_geom,
mapping=mapping,
data=data,
Expand All @@ -364,4 +369,5 @@ def stat_ecdf(mapping=None, *, data=None, geom=None,
n=n,
pad=ecdf_pad,
color_by=color_by,
**other_args)
**other_args) + \
limits_spec