# External routines we need. import g3read as g3 import matplotlib as mpl mpl.use('TkAgg') import matplotlib.pyplot as plt # Read the data from the snapshot. filename = 'snap_144' f = g3.GadgetFile(filename) pos = f.read_new("POS ", 0) # Set up the figure and axis ranges. fig = plt.figure() ax = plt.axes(xlim=(0, 48000), ylim=(0, 48000)) ax.set_aspect('equal', adjustable='box') # Plot the positions. point = ax.plot(pos[:,0], pos[:,1], '.', markersize=0.1) # Show the plot. plt.show()