@@ -769,8 +769,12 @@ def set_zlim3d(self, bottom=None, top=None, emit=True, auto=False,
769
769
return bottom , top
770
770
set_zlim = set_zlim3d
771
771
772
- def get_xlim3d (self ):
772
+ def get_xlim3d (self , units = True ):
773
+ if units :
774
+ return self ._convert_back_lim (
775
+ self .xy_viewLim .intervalx , self .xaxis )
773
776
return tuple (self .xy_viewLim .intervalx )
777
+
774
778
get_xlim3d .__doc__ = maxes .Axes .get_xlim .__doc__
775
779
get_xlim = get_xlim3d
776
780
if get_xlim .__doc__ is not None :
@@ -779,8 +783,12 @@ def get_xlim3d(self):
779
783
This function now correctly refers to the 3D x-limits
780
784
"""
781
785
782
- def get_ylim3d (self ):
786
+ def get_ylim3d (self , units = True ):
787
+ if units :
788
+ return self ._convert_back_lim (
789
+ self .xy_viewLim .intervaly , self .yaxis )
783
790
return tuple (self .xy_viewLim .intervaly )
791
+
784
792
get_ylim3d .__doc__ = maxes .Axes .get_ylim .__doc__
785
793
get_ylim = get_ylim3d
786
794
if get_ylim .__doc__ is not None :
@@ -789,8 +797,24 @@ def get_ylim3d(self):
789
797
This function now correctly refers to the 3D y-limits.
790
798
"""
791
799
792
- def get_zlim3d (self ):
793
- '''Get 3D z limits.'''
800
+ def get_zlim3d (self , units = True ):
801
+ '''
802
+ Get 3D z limits.
803
+
804
+ Parameters
805
+ ----------
806
+ units : bool, optional
807
+ If *True*, return limits with units attached.
808
+
809
+ Returns
810
+ -------
811
+ zlimits : tuple
812
+ Returns the current z-axis limits as the tuple
813
+ ``(z0, z1)``.
814
+ '''
815
+ if units :
816
+ return self ._convert_back_lim (
817
+ self .zz_viewLim .intervalx , self .zaxis )
794
818
return tuple (self .zz_viewLim .intervalx )
795
819
get_zlim = get_zlim3d
796
820
0 commit comments