GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — settable `LineStack.separation` by kushalkolar · Pull Request #990 · fastplotlib/fastplotlib

Conversation

@kushalkolar

@kushalkolar kushalkolar commented Feb 4, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Useful to be able to set the separation. Also the default is now 0.0 since 10 is often way too large when y-values are small. Will probably have to update gallery examples, will do later.

closes #898

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
kushalkolar added 2 commits February 4, 2026 18:48
@kushalkolar
settable separation
26648de
@kushalkolar
default separation as 0.0
21202af
@kushalkolar
kushalkolar requested a review from clewis7 as a code owner February 4, 2026 23:50
@github-actions

github-actions Bot commented Feb 5, 2026

Copy link
Copy Markdown

📚 Docs preview built and uploaded! https://www.fastplotlib.org/ver/line-stack-sep-setter

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kushalkolar

kushalkolar commented Feb 5, 2026

Copy link
Copy Markdown
Member Author

@clewis7 gtg, I don't need to change the examples they explicitly set the separation already :D

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

clewis7
clewis7 requested changes Feb 17, 2026
View reviewed changes
Comment thread fastplotlib/graphics/line_collection.py
metadatas: Sequence[Any] | np.ndarray = None,
isolated_buffer: bool = True,
separation: float = 10.0,
separation: float = 0.0,

@clewis7 clewis7 Feb 17, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default separation needs to be bigger than 0, otherwise it will just plot all of the user's lines on top of each other, which might be confusing/unexpected

If 10 is too big, just do 1.0 or something small

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@kushalkolar kushalkolar Feb 17, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 stacks them with no gap between the ymax of the previous and ymin of the next. 1 can be too much when the yrange of the data is very small.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@kushalkolar kushalkolar Feb 17, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I was thinking 0 would be a good default, just plain stacking

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@clewis7 clewis7 Feb 18, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So all the lines are on top of each other? Why would someone not just use a LineCollection then?

Maybe the default should be a value based on the data. Similar to vmin/vmax, do a quick calc of the y range or x range depending on the separation axis and use that as the default.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@kushalkolar kushalkolar Apr 20, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 means it is placed above the y-max of the previous line, so stacking with no extra spacing

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@kushalkolar kushalkolar Apr 20, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see this line https://github.com/fastplotlib/fastplotlib/pull/990/changes#diff-03fd64063e483d20627556522309e2b0db62af2bfac92d975125122470f14809R665

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kushalkolar

kushalkolar commented May 4, 2026

Copy link
Copy Markdown
Member Author

I'm now thinking if we should just have LineStack functionality into LineCollection. Sometimes you see a stack and then you want to see them on top of each other for a few traces (easy peasy since we now have the VisibilitySelector). Maybe LineCollection.separation = None means no stacking, LineCollection.separation = 0.0 means stacking directly on top based on previous line's y-max. We keep LineStack as just a simple subclass for API stability since I think a lot of people are using that already.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kushalkolar

kushalkolar commented Sep 2, 2026

Copy link
Copy Markdown
Member Author

superseeded in #1072 1072

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kushalkolar kushalkolar closed this Sep 2, 2026
@kushalkolar kushalkolar mentioned this pull request Sep 2, 2026
flat graphic features #663
Closed
@kushalkolar
kushalkolar deleted the line-stack-sep-setter branch October 16, 2026 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@clewis7 clewis7 clewis7 requested changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

change separation of an existing LineStack

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@kushalkolar @clewis7
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.