General Plotting Routines plotting.genplots#

3D Animated Plots#

The key plot generated by GalaRP for aesthetic purposes is a 3D, interactive figure that leverages k3d. To generate this plot, use the following line:

grp.k3d_plot([orbits], outname="3D_plot.html", duration=120)

Warning this has a tendancy to crash Jupyter notebooks if the OrbitContainer has a large number of particles, but it usually will still successfully return the html object.

Showing distributions in 3D#

To plot the distribution of particles at different points of the simulation, and also check GalaRP’s ability to measure the disk size, you can use the pyplot_3D_plot.

grp.pyplot_3D_plot(orbits, nrows=2, ncols=2, tmin=450, tmax=800, cmap="rainbow", rmax=35)

This will show the distribution of particles, color-coded by vertical velocity, at different snapshots. The snapshots shown can be controlled with nrows, ncols, tmin, and tmax.