|
10 | 10 | from jsonschema import validate |
11 | 11 | from plotly.subplots import make_subplots |
12 | 12 |
|
| 13 | +from plotme.helper import strip_white_space |
13 | 14 | from plotme.load_data import Folder, check_filter_match |
14 | 15 | from plotme.schema import schema, template |
15 | 16 |
|
@@ -88,12 +89,15 @@ def single_plot(args_dict={}): |
88 | 89 |
|
89 | 90 | title = args_dict.get('title_text', 'plotme plot') |
90 | 91 | x_id = args_dict.get('x_id', 'index') |
| 92 | + x_id = strip_white_space(x_id) |
91 | 93 | x_title = args_dict.get('x_title', x_id) # use x_id if no label is given |
92 | 94 | y_id = args_dict.get('y_id', 'headers') |
| 95 | + y_id = strip_white_space(y_id) |
93 | 96 | y_title = args_dict.get('y_title', y_id) # use y_id if no label is given |
94 | 97 | trace_mode = args_dict.get('trace_mode', 'markers') |
95 | 98 | marker_symbols = args_dict.get('marker_symbols') |
96 | 99 | show_legend = args_dict.get('showlegend', True) |
| 100 | + update_layout_kwargs = args_dict.get('update_layout_args', {}) |
97 | 101 | x_axes_kwargs = args_dict.get('x_axes_kwargs', {}) |
98 | 102 | y_axes_kwargs = args_dict.get('y_axes_kwargs', {}) |
99 | 103 | x_axes_visible = args_dict.get('xaxes_visible', True) |
@@ -203,6 +207,7 @@ def single_plot(args_dict={}): |
203 | 207 |
|
204 | 208 | fig.update_layout(height=height, width=width, title_text=title) |
205 | 209 | fig.update_layout(showlegend=show_legend) |
| 210 | + fig.update_layout(**update_layout_kwargs) |
206 | 211 | fig.update_xaxes(visible=x_axes_visible, **x_axes_kwargs) |
207 | 212 | fig.update_yaxes(visible=y_axes_visible, **y_axes_kwargs) |
208 | 213 |
|
|
0 commit comments