
Hello everyone, could someone tell me how to plot a sphere in a color other than black? I've got this much working: p.modify['sphere']((x,y,z), radius, ) to plot a sphere at x, y, z of radius radius, but I cannot seem to succeed in changing the color. Thanks, Brian

Hi Brian,
It's not obvious how to do this. You need to make a dict with the properties of the circle you want, taken from here: http://matplotlib.sourceforge.net/api/artist_api.html?highlight=circle#matpl... (if broken above) http://tinyurl.com/2vtbwqr Here's example of a session where I made the attached image. In [1]: pf = load("data0111") In [2]: pc = PlotCollection(pf) yt INFO 2010-09-18 21:04:13,555 Getting the binary hierarchy yt INFO 2010-09-18 21:04:13,569 Finished with binary hierarchy reading yt.lagos INFO 2010-09-18 21:04:13,842 Max Value is 2.81423e-26 at 0.5100097656250000 0.4914550781250000 0.5051269531250000 in grid EnzoGrid_0060 at level 4 (8, 8, 10) yt INFO 2010-09-18 21:04:13,842 Created plot collection with default plot-center = [0.510009765625, 0.491455078125, 0.505126953125] In [3]: pc.add_projection("Density", 0) Out[3]: <yt.raven.PlotTypes.ProjectionPlot object at 0x5e6dad0> In [4]: d = {'facecolor':'blue', 'edgecolor':'green', 'fill':True} In [5]: pc.plots[-1].modify['sphere']([0.3,0.3,0.3], 0.1, circle_args=d) Out[5]: 0 In [6]: pc.save() yt INFO 2010-09-18 21:04:40,063 Saved data0111_Projection_x_Density.png Out[6]: ['data0111_Projection_x_Density.png'] _______________________________________________________ sskory@physics.ucsd.edu o__ Stephen Skory http://physics.ucsd.edu/~sskory/ _.>/ _Graduate Student ________________________________(_)_\(_)_______________

Brian,
I am unable to reproduce this bug. The "fill" is being respected in my tests. Can you share the script that you've tried? _______________________________________________________ sskory@physics.ucsd.edu o__ Stephen Skory http://physics.ucsd.edu/~sskory/ _.>/ _Graduate Student ________________________________(_)_\(_)_______________

Hi Brian,
It's not obvious how to do this. You need to make a dict with the properties of the circle you want, taken from here: http://matplotlib.sourceforge.net/api/artist_api.html?highlight=circle#matpl... (if broken above) http://tinyurl.com/2vtbwqr Here's example of a session where I made the attached image. In [1]: pf = load("data0111") In [2]: pc = PlotCollection(pf) yt INFO 2010-09-18 21:04:13,555 Getting the binary hierarchy yt INFO 2010-09-18 21:04:13,569 Finished with binary hierarchy reading yt.lagos INFO 2010-09-18 21:04:13,842 Max Value is 2.81423e-26 at 0.5100097656250000 0.4914550781250000 0.5051269531250000 in grid EnzoGrid_0060 at level 4 (8, 8, 10) yt INFO 2010-09-18 21:04:13,842 Created plot collection with default plot-center = [0.510009765625, 0.491455078125, 0.505126953125] In [3]: pc.add_projection("Density", 0) Out[3]: <yt.raven.PlotTypes.ProjectionPlot object at 0x5e6dad0> In [4]: d = {'facecolor':'blue', 'edgecolor':'green', 'fill':True} In [5]: pc.plots[-1].modify['sphere']([0.3,0.3,0.3], 0.1, circle_args=d) Out[5]: 0 In [6]: pc.save() yt INFO 2010-09-18 21:04:40,063 Saved data0111_Projection_x_Density.png Out[6]: ['data0111_Projection_x_Density.png'] _______________________________________________________ sskory@physics.ucsd.edu o__ Stephen Skory http://physics.ucsd.edu/~sskory/ _.>/ _Graduate Student ________________________________(_)_\(_)_______________

Brian,
I am unable to reproduce this bug. The "fill" is being respected in my tests. Can you share the script that you've tried? _______________________________________________________ sskory@physics.ucsd.edu o__ Stephen Skory http://physics.ucsd.edu/~sskory/ _.>/ _Graduate Student ________________________________(_)_\(_)_______________
participants (3)
-
Brian Crosby
-
Matthew Turk
-
Stephen Skory