|
20 | 20 | LinearColorMapper, |
21 | 21 | OpenURL, |
22 | 22 | Patches, |
| 23 | + Span, |
23 | 24 | TapTool, |
24 | | - Span |
25 | 25 | ) |
26 | 26 | from bokeh.plotting import figure, show |
27 | 27 |
|
@@ -457,9 +457,11 @@ def portrait_plot( |
457 | 457 |
|
458 | 458 | # if using glyph rows, add borders |
459 | 459 | if glyph_rows: |
460 | | - line_locations = np.arange(0, len(yaxis_labels)+1, 1) |
| 460 | + line_locations = np.arange(0, len(yaxis_labels) + 1, 1) |
461 | 461 | for loc in line_locations: |
462 | | - h_lines = Span(location=loc, dimension='width', line_color='black', line_width=2) |
| 462 | + h_lines = Span( |
| 463 | + location=loc, dimension="width", line_color="black", line_width=2 |
| 464 | + ) |
463 | 465 | plot.add_layout(h_lines) |
464 | 466 |
|
465 | 467 | # Link to open when clicked |
@@ -792,16 +794,16 @@ def get_glyph_row_points(glyph_rows: int): |
792 | 794 |
|
793 | 795 | xpts = [0, 0, 1, 1] |
794 | 796 | xpts_list = [xpts] * glyph_rows |
795 | | - row_height = 1/glyph_rows |
| 797 | + row_height = 1 / glyph_rows |
796 | 798 | ypts_list = [] |
797 | 799 | positions = [] |
798 | 800 | for g in range(0, glyph_rows): |
799 | | - gypts = np.arange(0, 1+row_height, row_height).astype('float') |
| 801 | + gypts = np.arange(0, 1 + row_height, row_height).astype("float") |
800 | 802 | gypts = np.round(gypts, 3) |
801 | 803 | gypts_list = [float(x) for x in gypts] |
802 | | - g_array = [gypts_list[g], gypts_list[g+1], gypts_list[g+1], gypts_list[g]] |
| 804 | + g_array = [gypts_list[g], gypts_list[g + 1], gypts_list[g + 1], gypts_list[g]] |
803 | 805 | ypts_list.append(g_array) |
804 | | - position = f'region{g+1}' |
| 806 | + position = f"region{g + 1}" |
805 | 807 | positions.append(position) |
806 | 808 |
|
807 | 809 | return xpts_list, ypts_list, positions |
0 commit comments