Created
March 31, 2019 00:28
-
-
Save kenenbek/d67993f20d55ef7d91b09fc03f110341 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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