Added path.sketcFix sketch seed support and add seed to SketchParams type casterh_seed to rcParams#31311
Added path.sketcFix sketch seed support and add seed to SketchParams type casterh_seed to rcParams#31311Aryan-Gore wants to merge 9 commits intomatplotlib:mainfrom
Conversation
|
Thanks for tackling this, please add @AryanSheka as a co-author |
|
Seed can be manually set for path.sketch by modifying the value of rcParams path.sketch_seed or by passing a seed value to xkcd or Artist.set_sketch . Seed will also have a rolling(auto incrementing) behaviour. Co-Authored-By: Oscar Gustafsson <[email protected]> Co-Authored-By: eudoxos <[email protected]> Co-authored-by: AryanSheka
2343a8e to
fca1464
Compare
Hi @story645, I've added a test for deterministic sketch seed behavior (test_sketch_rolling_seed) — verifying that the same seed produces identical output every time. All 7 sketch/xkcd tests are now passing. Please let me know if there's anything else needed |
|
Hi, so the C++ isn't compiling and that's why all the tests are failing. I'm gonna convert this to draft, please make sure the code compiles before submitting it for review. If you're struggling w/ the compilation, please ask questions. Also please fill out the pull request template: |
Hi @story645, I've pushed the fix for the C++ compilation issue (Sketch constructor calls now pass seed argument in _backend_agg.h). All 7 sketch/xkcd tests are passing locally. I've also filled out the PR template. Please let me know if anything else is needed! |
|
test failures are related to the PR, please either debug or ask questions if you're stuck |
Hi @story645, I've pushed all the fixes — SketchParams type caster now handles 4-tuple correctly with proper indentation, and Sketch constructor calls pass seed in _backend_agg.h. All 7 tests passing locally. |
please make sure they also pass on CI. If you haven't yet, install the pre-commit hooks to help with the linting errors. |
ok |
i have checkd all but i am not getting these errors. |
|
i am stuck here unable to do it , can you suggest specific changes I should focus on, or would it be better for me to start with a smaller issue first? |
|
The remaining test failures are all known to be flaky, so not caused by this PR. |
PR Summary
This PR adds a configurable seed for the sketch/xkcd path randomness,
fixing issue #13479 where all paths used seed 0 causing repetitive patterns.
Closes #13479
Rebased from #26050 (original work by @AryanSheka, @oscargus, @eudoxos)
Changes
path.sketch_seedto rcParamsChecklist