File size: 576 Bytes
39c21b2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import numpy as np
import matplotlib.pyplot as plt

# Load the data from the .xy file
filename = '/home/gabeguo/cdvae_xrd/paper_results_PRELIM/_sinc10_/material29_mp-1205608_SmMn2SiC/gt/xrd/hiRes_both_10_0.001_material29_mp-1205608_SmMn2SiC.xy'
data = np.loadtxt(filename)

# Assign each column to the corresponding variable
two_theta = data[:, 0]
intensity = data[:, 1]

# Plotting the data
plt.figure(figsize=(10, 6))

# Plot intensity
plt.plot(two_theta, intensity, linewidth=4)
plt.tight_layout()
plt.grid(True)

# Display the plot
plt.savefig('sample_pxrd.png', dpi=400)