Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ec666e2

Browse filesBrowse files
authored
PlotArea.center_graphic() default zoom 1.35 -> 1.0 (#656)
1 parent 4a1b983 commit ec666e2
Copy full SHA for ec666e2

File tree

1 file changed

+8
-6
lines changed
Filter options

1 file changed

+8
-6
lines changed

‎fastplotlib/layouts/_plot_area.py

Copy file name to clipboardExpand all lines: fastplotlib/layouts/_plot_area.py
+8-6Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ def _check_graphic_name_exists(self, name):
543543
f"All graphics within a subplot or plot area must have a unique name."
544544
)
545545

546-
def center_graphic(self, graphic: Graphic, zoom: float = 1.35):
546+
def center_graphic(self, graphic: Graphic, zoom: float = 1.0):
547547
"""
548548
Center the camera w.r.t. the passed graphic
549549
@@ -552,7 +552,7 @@ def center_graphic(self, graphic: Graphic, zoom: float = 1.35):
552552
graphic: Graphic
553553
The graphic instance to center on
554554
555-
zoom: float, default 1.3
555+
zoom: float
556556
zoom the camera after centering
557557
558558
"""
@@ -569,10 +569,11 @@ def center_scene(self, *, zoom: float = 1.0):
569569
570570
Parameters
571571
----------
572-
zoom: float, default 1.3
572+
zoom: float
573573
apply a zoom after centering the scene
574574
575575
"""
576+
576577
if not len(self._fpl_graphics_scene.children) > 0:
577578
return
578579

@@ -600,10 +601,11 @@ def auto_scale(
600601
Maintain the camera aspect ratio for all dimensions. If ``None``, the aspect is left unchanged.
601602
if ``False`` the camera is scaled to the bounding box of the current scene.
602603
603-
zoom: float, default 0.8
604-
zoom value for the camera after auto-scaling, if zoom = 1.0 then the graphics
605-
in the scene will fill the entire canvas.
604+
zoom: float
605+
zoom value for the camera after auto-scaling
606+
606607
"""
608+
607609
if not len(self._fpl_graphics_scene.children) > 0:
608610
return
609611

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.