Sets and returns default axis object for dendrogram figure. :param (str) axis_key: E.g., 'xaxis', 'xaxis1', 'yaxis', yaxis1', etc. :rtype (dict): An axis_key dictionary with set parameters.
(self, axis_key)
| 255 | return default_colors |
| 256 | |
| 257 | def set_axis_layout(self, axis_key): |
| 258 | """ |
| 259 | Sets and returns default axis object for dendrogram figure. |
| 260 | |
| 261 | :param (str) axis_key: E.g., 'xaxis', 'xaxis1', 'yaxis', yaxis1', etc. |
| 262 | :rtype (dict): An axis_key dictionary with set parameters. |
| 263 | |
| 264 | """ |
| 265 | axis_defaults = { |
| 266 | "type": "linear", |
| 267 | "ticks": "outside", |
| 268 | "mirror": "allticks", |
| 269 | "rangemode": "tozero", |
| 270 | "showticklabels": True, |
| 271 | "zeroline": False, |
| 272 | "showgrid": False, |
| 273 | "showline": True, |
| 274 | } |
| 275 | |
| 276 | if len(self.labels) != 0: |
| 277 | axis_key_labels = self.xaxis |
| 278 | if self.orientation in ["left", "right"]: |
| 279 | axis_key_labels = self.yaxis |
| 280 | if axis_key_labels not in self.layout: |
| 281 | self.layout[axis_key_labels] = {} |
| 282 | self.layout[axis_key_labels]["tickvals"] = [ |
| 283 | zv * self.sign[axis_key] for zv in self.zero_vals |
| 284 | ] |
| 285 | self.layout[axis_key_labels]["ticktext"] = self.labels |
| 286 | self.layout[axis_key_labels]["tickmode"] = "array" |
| 287 | |
| 288 | self.layout[axis_key].update(axis_defaults) |
| 289 | |
| 290 | return self.layout[axis_key] |
| 291 | |
| 292 | def set_figure_layout(self, width, height): |
| 293 | """ |
no test coverage detected