MCPcopy Index your code
hub / github.com/plotly/plotly.py / _axis_title_annotation

Function _axis_title_annotation

plotly/figure_factory/_facet_grid.py:112–137  ·  view source on GitHub ↗
(text, x_or_y_axis)

Source from the content-addressed store, hash-verified

110
111
112def _axis_title_annotation(text, x_or_y_axis):
113 if x_or_y_axis == "x":
114 x_pos = 0.5
115 y_pos = -0.1
116 textangle = 0
117 elif x_or_y_axis == "y":
118 x_pos = -0.1
119 y_pos = 0.5
120 textangle = 270
121
122 if not text:
123 text = ""
124
125 annot = {
126 "font": {"color": "#000000", "size": AXIS_TITLE_SIZE},
127 "showarrow": False,
128 "text": text,
129 "textangle": textangle,
130 "x": x_pos,
131 "xanchor": "center",
132 "xref": "paper",
133 "y": y_pos,
134 "yanchor": "middle",
135 "yref": "paper",
136 }
137 return annot
138
139
140def _add_shapes_to_fig(fig, annot_rect_color, flipped_rows=False, flipped_cols=False):

Callers 1

create_facet_gridFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected