Skip to content

PlotArea.center_graphic() default zoom 1.35 -> 1.0 #656

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

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Changes from all commits
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
14 changes: 8 additions & 6 deletions fastplotlib/layouts/_plot_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ def _check_graphic_name_exists(self, name):
f"All graphics within a subplot or plot area must have a unique name."
)

def center_graphic(self, graphic: Graphic, zoom: float = 1.35):
def center_graphic(self, graphic: Graphic, zoom: float = 1.0):
"""
Center the camera w.r.t. the passed graphic

Expand All @@ -552,7 +552,7 @@ def center_graphic(self, graphic: Graphic, zoom: float = 1.35):
graphic: Graphic
The graphic instance to center on

zoom: float, default 1.3
zoom: float
zoom the camera after centering

"""
Expand All @@ -569,10 +569,11 @@ def center_scene(self, *, zoom: float = 1.0):

Parameters
----------
zoom: float, default 1.3
zoom: float
apply a zoom after centering the scene

"""

if not len(self._fpl_graphics_scene.children) > 0:
return

Expand Down Expand Up @@ -600,10 +601,11 @@ def auto_scale(
Maintain the camera aspect ratio for all dimensions. If ``None``, the aspect is left unchanged.
if ``False`` the camera is scaled to the bounding box of the current scene.

zoom: float, default 0.8
zoom value for the camera after auto-scaling, if zoom = 1.0 then the graphics
in the scene will fill the entire canvas.
zoom: float
zoom value for the camera after auto-scaling

"""

if not len(self._fpl_graphics_scene.children) > 0:
return

Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy