Skip to content

Commit

Permalink
factor out another
Browse files Browse the repository at this point in the history
One ugly line left over but deal with it later
  • Loading branch information
wspr committed Apr 9, 2024
1 parent 0584b42 commit a68e2c9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions ausankey/ausankey.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,10 +486,6 @@ def subplot(self, ii):
self.data[2 * ii + 2],
self.data[2 * ii + lastind],
]
weights_lr = [
self.data[2 * ii + 1],
self.data[2 * ii + 1 + 2],
]

# vertical positions
y_node_gap = self.node_gap * self.plot_height_nom
Expand Down Expand Up @@ -522,7 +518,7 @@ def subplot(self, ii):
for lr in [0, 1]:
for i, label in enumerate(self.node_list[ii + lr]):
node_height = self.node_sizes[ii + lr][label]
this_side_height = weights_lr[lr][labels_lr[lr] == label].sum()
this_side_height = self.data[2 * (ii + lr) + 1][labels_lr[lr] == label].sum()
node_voffset[lr][label] = self.vscale * (node_height - this_side_height)
next_bot = node_pos_top[lr][self.node_list[ii + lr][i - 1]] + y_node_gap if i > 0 else 0
node_pos_bot[lr][label] = self.voffset[ii + lr] if i == 0 else next_bot
Expand Down

0 comments on commit a68e2c9

Please sign in to comment.