1

i got this bunch of code :

import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
from matplotlib import animation



%matplotlib inline

plt.ion()
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.view_init(azim=270, elev=90)

ax.set_xlabel('X axis')
ax.set_ylabel('Y axis')
ax.set_zlabel('Z axis')

X = -df['x']
Y = -df['y']
Z = -df['z']


ax.scatter(X,Y,Z, color = 'red')



plt.draw()

this code gives this plot:

Image

I would like to set objects over the point clouds like this:

enter image description here

is this possible? Does anyone got a proper solution for that?

I would be grateful for any help!

Daniel
  • 163
  • 12

1 Answers1

0

you can add a circle to the matplotlib using a x and y coordinate

def circle_points(x, y, radius, ax=None, **kwargs):
    if not ax: ax=plt.gca()
    circle = plt.Circle((x, y), radius, **kwargs)
    ax.add_artist(circle)
    return circle
Golden Lion
  • 3,840
  • 2
  • 26
  • 35