Skip to content

Commit 76d34d7

Browse files
Github action: auto-update.
1 parent 6ecfee4 commit 76d34d7

File tree

74 files changed

+357
-357
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+357
-357
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

dev/_downloads/3a94d6fb7758da7ad9e13fbc319e4761/plot_darcy_flow_spectrum.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -97,26 +97,26 @@
9797
truth_sp = spectrum_2d(dataset_pred.reshape(samples * batchsize, s, s), s)
9898

9999
# Configure pyplot and generate the plot
100-
fig, ax = plt.subplots(figsize=(10,10))
101-
102-
linewidth = 3
100+
plt.style.use('classic')
101+
fig, ax = plt.subplots(figsize=(10, 10), dpi=150)
102+
ax.set_facecolor('white')
103103
ax.set_yscale('log')
104-
105-
length = dataset_pred.shape[-1] # the resolution length of the dataset
106-
buffer = 10 # just add a buffer to the plot
104+
length = dataset_pred.shape[-1] # the resolution length of the dataset
105+
buffer = 10 # just add a buffer to the plot
107106
k = np.arange(length + buffer) * 1.0
108-
ax.plot(truth_sp, 'k', linestyle=":", label="NS", linewidth=4)
109107

110-
ax.set_xlim(1,length+buffer)
111-
ax.set_ylim(0.1, 100)
112-
plt.legend(prop={'size': 20})
113-
plt.title('Spectrum of {} Datset'.format(dataset_name))
108+
# Plot the spectrum
109+
ax.plot(truth_sp, color='navy', linestyle="--", linewidth=2.5)
114110

115-
plt.xlabel('wavenumber')
116-
plt.ylabel('energy')
111+
# Customizing the plot
112+
ax.set_xlim(1, length+buffer)
113+
ax.set_ylim(0.1, 100)
114+
ax.set_xlabel('Wavenumber', fontsize=14, fontweight='bold')
115+
ax.set_ylabel('Energy', fontsize=14, fontweight='bold')
116+
ax.set_title(f'Spectrum of {dataset_name} Dataset',
117+
fontsize=16, fontweight='bold', pad=20)
118+
ax.tick_params(axis='both', which='major', labelsize=12)
117119

118-
# show the figure
119-
leg = plt.legend(loc='best')
120-
leg.get_frame().set_alpha(0.5)
120+
plt.tight_layout()
121121
plt.show()
122122
# %%
21 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)