Skip to content

Commit 11ae6fa

Browse files
plot_1d_data: create figure only when saving
1 parent c7b7c04 commit 11ae6fa

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

cs_util/plots.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,8 @@ def plot_data_1d(
223223
if linewidths is None:
224224
linewidths = [2] * len(x)
225225

226-
figure(figsize=(15, 10))
226+
if out_path:
227+
figure(figsize=(15, 10))
227228

228229
for i in range(len(x)):
229230
if np.isnan(yerr[i]).all():

0 commit comments

Comments
 (0)