(
text, lane, num_of_lanes, SUBPLOT_SPACING, row_col="col", flipped=True
)
| 66 | |
| 67 | |
| 68 | def _annotation_dict( |
| 69 | text, lane, num_of_lanes, SUBPLOT_SPACING, row_col="col", flipped=True |
| 70 | ): |
| 71 | temp = (1 - (num_of_lanes - 1) * SUBPLOT_SPACING) / (num_of_lanes) |
| 72 | if not flipped: |
| 73 | xanchor = "center" |
| 74 | yanchor = "middle" |
| 75 | if row_col == "col": |
| 76 | x = (lane - 1) * (temp + SUBPLOT_SPACING) + 0.5 * temp |
| 77 | y = 1.03 |
| 78 | textangle = 0 |
| 79 | elif row_col == "row": |
| 80 | y = (lane - 1) * (temp + SUBPLOT_SPACING) + 0.5 * temp |
| 81 | x = 1.03 |
| 82 | textangle = 90 |
| 83 | else: |
| 84 | if row_col == "col": |
| 85 | xanchor = "center" |
| 86 | yanchor = "bottom" |
| 87 | x = (lane - 1) * (temp + SUBPLOT_SPACING) + 0.5 * temp |
| 88 | y = 1.0 |
| 89 | textangle = 270 |
| 90 | elif row_col == "row": |
| 91 | xanchor = "left" |
| 92 | yanchor = "middle" |
| 93 | y = (lane - 1) * (temp + SUBPLOT_SPACING) + 0.5 * temp |
| 94 | x = 1.0 |
| 95 | textangle = 0 |
| 96 | |
| 97 | annotation_dict = dict( |
| 98 | textangle=textangle, |
| 99 | xanchor=xanchor, |
| 100 | yanchor=yanchor, |
| 101 | x=x, |
| 102 | y=y, |
| 103 | showarrow=False, |
| 104 | xref="paper", |
| 105 | yref="paper", |
| 106 | text=str(text), |
| 107 | font=dict(size=13, color=AXIS_TITLE_COLOR), |
| 108 | ) |
| 109 | return annotation_dict |
| 110 | |
| 111 | |
| 112 | def _axis_title_annotation(text, x_or_y_axis): |
no outgoing calls
no test coverage detected