You are reading documentation for the unreleased version of Matplotlib. Try searching for the released version of this page instead?
Applications are open for the 2018 John Hunter Matplotlib Summer Fellowship. Apply now!
Version 2.2.2.post1752+g4b1f956cb
Fork me on GitHub

Related Topics

Axis line stylesΒΆ

This example shows some configurations for axis style.

from mpl_toolkits.axisartist.axislines import SubplotZero
import matplotlib.pyplot as plt
import numpy as np

if 1:
    fig = plt.figure(1)
    ax = SubplotZero(fig, 111)

    for direction in ["xzero", "yzero"]:
        # adds arrows at the ends of each axis

        # adds X and Y-axis from the origin

    for direction in ["left", "right", "bottom", "top"]:
        # hides borders

    x = np.linspace(-0.5, 1., 100)
    ax.plot(x, np.sin(x*np.pi))

Keywords: matplotlib code example, codex, python plot, pyplot Gallery generated by Sphinx-Gallery