forked from lanl/CLAMR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plotcutall.py
33 lines (27 loc) · 1.27 KB
/
plotcutall.py
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
30
31
32
33
import matplotlib.pyplot as plt
import numpy as np
fig, ax = plt.subplots()
x1, y1 = np.loadtxt('cell.cut1000', delimiter=',', unpack=True)
x2, y2 = np.loadtxt('face.cut1000', delimiter=',', unpack=True)
x3, y3 = np.loadtxt('cellinplace.cut1000', delimiter=',', unpack=True)
x4, y4 = np.loadtxt('faceinplace.cut1000', delimiter=',', unpack=True)
x5, y5 = np.loadtxt('reggridbycell.cut1000', delimiter=',', unpack=True)
x6, y6 = np.loadtxt('reggridbyface.cut1000', delimiter=',', unpack=True)
plt.scatter(x1,y1, marker="+", label='Original AMR Cell', color='black')
plt.scatter(x2,y2, marker="x", label='Original AMR Face', color='grey')
plt.scatter(x3,y3, marker="1", label='In-Place Cell', color='red')
plt.scatter(x4,y4, marker="2", label='In-Place Face', color='tomato')
plt.scatter(x5,y5, marker="3", label='Regular Grid Cell', color='blue')
plt.scatter(x6,y6, marker="4", label='Regular Grid Face', color='royalblue')
axes = plt.gca() # get current axes
axes.set_ylim([0,90])
axes.set_xlim([0,15])
plt.xlabel('Radius',fontsize=18)
plt.ylabel('Height',fontsize=18)
ax.tick_params(axis = 'both', labelsize = 14)
plt.legend()
plt.setp(ax.get_legend().get_texts(), fontsize='14') # for legend text
fig.tight_layout()
plt.savefig("cutplanesall.pdf")
plt.savefig("cutplanesall.jpg")
plt.show()