has2k1 / has2k1/plotnine

geom_smooth with more than 999 rows

Open
#522 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature
Dominant language
Python
Stars
4.8k
Forks
254
Avg merge
10h 35m
Merged PRs (30d)
9

Description

It looks like geom_smooth only supports up to 999 rows.

You can see below that when I increase the row count from 999 to 1000 I get a regression line rather than a smooth plot.

Screen Shot 2021-07-28 at 5 47 50 PM

Screen Shot 2021-07-28 at 5 47 38 PM

I tried to specify method = 'gam' but I get the following error which seems to indicate that gam is not available.

PlotnineError: "Method should be one of ['lm', 'ols', 'wls', 'rlm', 'glm', 'gls', 'lowess', 'loess', 'mavg', 'gpr']"

Is adding gam to geom_smooth for smoothing more than 1000 lines on the roadmap? Is there another method to accomplish this?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the geom_smooth entry point and reproduce the difference between 999 and 1000 rows using the example in the issue. Trace how the supported smoothing methods are selected, then add coverage for the row-count boundary and verify the intended smooth result and method availability.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.