Skip to content

add ruler extents - #1095

Open
FlynnOConnell wants to merge 3 commits into
mainfrom
fo/subclass-ruler
Open

FlynnOConnell wants to merge 3 commits into
mainfrom
fo/subclass-ruler

Conversation

@FlynnOConnell

Copy link
Copy Markdown
Collaborator

adding extents to ruler subclass

@github-actions

Copy link
Copy Markdown

📚 Docs preview built and uploaded! https://www.fastplotlib.org/ver/fo/subclass-ruler

Comment thread fastplotlib/axes/_axes.py
Comment on lines +760 to +772
# clamp to the extent, an extent outside the bbox collapses the ruler to the nearer end
lo, hi = self.x.extent
world_xmin = min(max(world_xmin, lo + self.offset[0]), world_xmax)
world_xmax = max(min(world_xmax, hi + self.offset[0]), world_xmin)

lo, hi = self.y.extent
world_ymin = min(max(world_ymin, lo + self.offset[1]), world_ymax)
world_ymax = max(min(world_ymax, hi + self.offset[1]), world_ymin)

lo, hi = self.z.extent
world_zmin = min(max(world_zmin, lo + self.offset[2]), world_zmax)
world_zmax = max(min(world_zmax, hi + self.offset[2]), world_zmin)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is one of the hottest paths in fastplotlib so benchmarks will be necessary (imgui fps monitor with some examples is fine)

Also see this, I had some ideas on doing faster calculations here: #1053

@kushalkolar

Copy link
Copy Markdown
Member

This looks like a good start! But for review I will need:

  1. What the full plan is
  2. Summarize what the changes are
  3. Example screenshots of the new stuff

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants