Skip to content

Instantly share code, notes, and snippets.

@kenenbek
Created March 31, 2019 00:28
Show Gist options
  • Select an option

  • Save kenenbek/d67993f20d55ef7d91b09fc03f110341 to your computer and use it in GitHub Desktop.

Select an option

Save kenenbek/d67993f20d55ef7d91b09fc03f110341 to your computer and use it in GitHub Desktop.
import matplotlib.pyplot as plt
from mpl_toolkits.axisartist.axislines import SubplotZero
fig = plt.figure(1, figsize=(6, 6))
ax = SubplotZero(fig, 111)
fig.add_subplot(ax)
for direction in ["xzero", "yzero"]:
ax.axis[direction].set_visible(True)
ax.set_ylim(-5, 5)
ax.set_xlim(-5, 5)
centreCircle = plt.Circle((0, 0), 1, color="black", fill=False, lw=2)
# Draw the circles to our plot
ax.add_patch(centreCircle)
plt.axis('equal')
for direction in ["left", "right", "bottom", "top"]:
# hides borders
ax.axis[direction].set_visible(False)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment