Skip to content

Instantly share code, notes, and snippets.

@ee08b397
Created July 24, 2015 21:39
Show Gist options
  • Save ee08b397/a735227cbcecd88666cc to your computer and use it in GitHub Desktop.
Save ee08b397/a735227cbcecd88666cc to your computer and use it in GitHub Desktop.
from mpl_toolkits.mplot3d import Axes3D
import mpl_toolkits.mplot3d.art3d as art3d
fig = plt.figure()
ax=fig.gca(projection='3d')
for i in ["x","y","z"]:
circle = Circle((0, 0), 1)
circle.set_clip_box(ax.bbox)
circle.set_edgecolor('b')
circle.set_facecolor('none') # "none" not None
ax.add_patch(circle)
art3d.pathpatch_2d_to_3d(circle, z=0, zdir=i)
plt.scatter(0, 0, s=800, facecolors='none', edgecolors='r') # alternative, looks not bad
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment