Add an xaxis label to the current subplot in layout dictionary. props.keys() -- [ 'text', (actual content string, not the text obj) 'position', (an x, y pair, not an mpl Bbox) 'coordinates', ('data', 'axes', 'figure', 'display') 'text_type', (
(self, **props)
| 737 | self.plotly_fig["layout"]["title_font"] = title_font |
| 738 | |
| 739 | def draw_xlabel(self, **props): |
| 740 | """Add an xaxis label to the current subplot in layout dictionary. |
| 741 | |
| 742 | props.keys() -- [ |
| 743 | 'text', (actual content string, not the text obj) |
| 744 | 'position', (an x, y pair, not an mpl Bbox) |
| 745 | 'coordinates', ('data', 'axes', 'figure', 'display') |
| 746 | 'text_type', ('title', 'xlabel', or 'ylabel') |
| 747 | 'style', (style dict, see below) |
| 748 | 'mplobj' (actual mpl text object) |
| 749 | ] |
| 750 | |
| 751 | props['style'].keys() -- [ |
| 752 | 'alpha', (opacity of text) |
| 753 | 'fontsize', (size in points of text) |
| 754 | 'color', (hex color) |
| 755 | 'halign', (horizontal alignment, 'left', 'center', or 'right') |
| 756 | 'valign', (vertical alignment, 'baseline', 'center', or 'top') |
| 757 | 'rotation', |
| 758 | 'zorder', (precedence of text when stacked with other objs) |
| 759 | ] |
| 760 | |
| 761 | """ |
| 762 | self.msg += " Adding xlabel\n" |
| 763 | axis_key = "xaxis{0}".format(self.axis_ct) |
| 764 | self.plotly_fig["layout"][axis_key]["title"] = str(props["text"]) |
| 765 | title_font = dict( |
| 766 | size=props["style"]["fontsize"], color=props["style"]["color"] |
| 767 | ) |
| 768 | self.plotly_fig["layout"][axis_key]["title_font"] = title_font |
| 769 | |
| 770 | def draw_ylabel(self, **props): |
| 771 | """Add a yaxis label to the current subplot in layout dictionary. |