Related Articles
Matplotlib.axis.Axis.get_minpos() function in Python
• Last Updated : 08 Jun, 2020

Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and used for working with the broader SciPy stack.

## matplotlib.axis.Axis.get_minpos() Function

The Axis.get_minpos() function in axis module of matplotlib library is used to get the minpos.

Syntax: Axis.get_minpos(self)

Parameters: This method does not accepts any parameters.

Return value: This method return the minpos.

Below examples illustrate the matplotlib.axis.Axis.get_minpos() function in matplotlib.axis:

Example 1:

## Python3

 `# Implementation of matplotlib function``from` `matplotlib.axis ``import` `Axis``import` `matplotlib.pyplot as plt ``import` `numpy as np ``     ` `X ``=` `np.arange(``-``5``, ``5``, ``1``) ``Y ``=` `np.arange(``-``5``, ``5``, ``1``) ``U, V ``=` `np.meshgrid(X, Y) ``       ` `fig, ax ``=` `plt.subplots() ``ax.quiver(X, Y, U, V)`` ` `w ``=` `ax.xaxis.get_minpos() ``     ` `print``(``"Value Return :\n"``+``str``(w)) ``    ` `fig.suptitle(``"""matplotlib.axis.Axis.get_minpos()``function Example\n"""``, fontweight ``=``"bold")  ``        ` `plt.show()`

Output:

```Value Return :
4.0
```

Example 2:

## Python3

 `# Implementation of matplotlib function ``from` `matplotlib.axis ``import` `Axis``import` `numpy as np``import` `matplotlib.pyplot as plt``  ` `fig, ax2 ``=` `plt.subplots(sharex ``=` `True``)``fig.subplots_adjust(left``=``0.2``, wspace``=``0.6``)``box ``=` `dict``(facecolor``=``'green'``, pad``=``5``, alpha``=``0.2``)``  ` `ax2.plot(``20``*``np.random.rand(``10``))``ax2.set_xlabel(``'X - Label'``, bbox``=``box)``ax2.set_xlim(``0``, ``10``)``Axis.set_label_coords(ax2.xaxis, ``0.5``, ``0.95``)`` ` `w ``=` `ax2.xaxis.get_minpos() ``     ` `print``(``"Value Return :\n"``+``str``(w)) ``    ` `fig.suptitle(``"""matplotlib.axis.Axis.get_minpos()``function Example\n"""``, fontweight ``=``"bold")  ``        ` `plt.show()`

Output:

```Value Return :
1.0```

Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.

To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course

My Personal Notes arrow_drop_up