How to use 'matlab axis limits' in Python

Every line of 'matlab axis limits' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
638def set_limits(self, xlim=None, ylim=None, ax=None):
639 """
640 Set the display limits.
642 Parameters
643 ----------
644 xlim : tuple, optional
645 2-Tuple containing y-axis limits in km. None uses default limits.
646 ylim : tuple, optional
647 2-Tuple containing x-axis limits in km. None uses default limits.
648 ax : Axis
649 Axis to adjust. None will adjust the current axis.
651 """
652 if ax is None:
653 ax = plt.gca()
654 if ylim is not None:
655 ax.set_ylim(ylim)
656 if xlim is not None:
657 ax.set_xlim(xlim)

Related snippets