summaryrefslogtreecommitdiffstats
path: root/demo_plot.py
blob: 85d8c0af1289fb61ec709758c09854228688e414 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import matplotlib.pyplot as plt
from Disk import Disk

# Load Data
disk = Disk(1)
disk.load_npz()

# Plot on Default Axis
disk.plot_rho_xy()
# disk.plot_rho_r()
# disk.plot_Q_xy()
# disk.plot_Q_r()

# Plot on Custom Axis
# fig = plt.figure()                        # 1x1 (Default)
# fig = plt.figure(figsize=(8.0, 6.0))      # 1x1 (Default)
# fig = plt.figure(figsize=(16.0, 6.0))     # 1x2
fig = plt.figure(figsize=(16.0, 12.0))      # 2x2
ax1 = fig.add_subplot(2,2,1)
ax2 = fig.add_subplot(2,2,2)
ax3 = fig.add_subplot(2,2,3)
ax4 = fig.add_subplot(2,2,4)
disk.plot_rho_r(ax1, ylim=[1.e-6, 0.01])
disk.plot_rho_xy(ax2, clim=[-6, -2])
disk.plot_Q_xy(ax3)
disk.plot_Q_r(ax4)
plt.suptitle('t=%0.2f' % disk.info["time"])
plt.savefig('DemoFig.pdf')
plt.show()