Autoscale the view limits using the data limits. See `.Axes.autoscale_view` for full documentation. Because this function applies to 3D Axes, it also takes a *scalez* argument.
(self, tight=None,
scalex=True, scaley=True, scalez=True)
| 691 | set_bound(v0, v1, self._view_margin) |
| 692 | |
| 693 | def autoscale_view(self, tight=None, |
| 694 | scalex=True, scaley=True, scalez=True): |
| 695 | """ |
| 696 | Autoscale the view limits using the data limits. |
| 697 | |
| 698 | See `.Axes.autoscale_view` for full documentation. Because this |
| 699 | function applies to 3D Axes, it also takes a *scalez* argument. |
| 700 | """ |
| 701 | # This method looks at the rectangular volume (see above) |
| 702 | # of data and decides how to scale the view portal to fit it. |
| 703 | if tight is None: |
| 704 | _tight = self._tight |
| 705 | if not _tight: |
| 706 | # if image data only just use the datalim |
| 707 | for artist in self._children: |
| 708 | if isinstance(artist, mimage.AxesImage): |
| 709 | _tight = True |
| 710 | elif isinstance(artist, (mlines.Line2D, mpatches.Patch)): |
| 711 | _tight = False |
| 712 | break |
| 713 | else: |
| 714 | _tight = self._tight = bool(tight) |
| 715 | |
| 716 | if scalex and self.get_autoscalex_on(): |
| 717 | self._autoscale_axis( |
| 718 | self.xaxis, *self.xy_dataLim.intervalx, |
| 719 | self.xy_dataLim.minposx, self._xmargin, |
| 720 | self.set_xbound, _tight) |
| 721 | |
| 722 | if scaley and self.get_autoscaley_on(): |
| 723 | self._autoscale_axis( |
| 724 | self.yaxis, *self.xy_dataLim.intervaly, |
| 725 | self.xy_dataLim.minposy, self._ymargin, |
| 726 | self.set_ybound, _tight) |
| 727 | |
| 728 | if scalez and self.get_autoscalez_on(): |
| 729 | self._autoscale_axis( |
| 730 | self.zaxis, *self.zz_dataLim.intervalx, |
| 731 | self.zz_dataLim.minposx, self._zmargin, |
| 732 | self.set_zbound, _tight) |
| 733 | |
| 734 | def get_w_lims(self): |
| 735 | """Get 3D world limits.""" |
no test coverage detected