Skip to content

Commit 383c2d6

Browse files
authored
Merge pull request #40 from SWIFTSIM/fix_plot_with_no_data_bug
make units consistent in the case of no data
2 parents 74472c6 + 85cc32d commit 383c2d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

velociraptor/autoplotter/lines.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,8 @@ def plot_line(
350350
up = errors
351351
down = errors
352352
else:
353-
up = 0
354-
down = 0
353+
up = unyt_quantity(0, units=heights.units)
354+
down = unyt_quantity(0, units=heights.units)
355355

356356
ax.fill_between(
357357
centers,

0 commit comments

Comments
 (0)