On Tue, Jul 31, 2018 at 3:03 PM, Sushilkumar
Dear yt:
Is there a way to annotate sphere to a plot? I used annotate_sphere but it plots an outline of a circle but I would like a "filled circle" to represent a star?
I have a python script (see below) to create a sphere, but not sure how to integrate it with yt
You can use the sphere callback as-is, you just need to pass in the necessary circle_args keyword argument to tell matplotlib to fill in the circle. Take a look at this notebook: https://gist.github.com/ngoldbaum/c6e0a4ce4c399e2f5bace6033ced2146 circle_args should take any keyword arguments accepted by the matplotlib circle patch object: https://matplotlib.org/api/_as_gen/matplotlib.patches.Circle.html Hope that helps, Nathan
Any suggestions Thank you in advance
#----------------------------------------------------------- ---------------
def create_sphere_coords(radius=10): """ function just returns a set of x,y,z coordinates for generating a sphere. """ r = radius pi = np.pi cos = np.cos sin = np.sin phi, theta = np.mgrid[0:pi:101j, 0:2 * pi:101j]
x = r * sin(phi) * cos(theta) y = r * sin(phi) * sin(theta) z = r * cos(phi)
return (x,y,z)
#----------------------------------------------------------- ---------------