Unanswered
Hey, Im Doing This (Id Like To Set Custom X_Ticks For The Plot):
Hey! So several things here:
As per the plotly docs, you have to give which axis you want to format, in your example plotly can't know. If you look closely to their example, you'll see it's a nested dict, with the key being 'xaxis' Your numpy data has x values of 1 2 3, but your extra layout has values 1 3 4 which don't match. Plotly took the first element of each subarray to be the x value.
If we fix these 2 things, your example becomes:task.logger.report_line_plot('this_is_the_title', [{'name': 'series_name', 'data': np.asarray([[1,3],[2,4],[3,5]])}], xaxis='x_label', yaxis='y_label', extra_layout=dict(xaxis=dict(tickmode='array', tickvals=[1, 2, 3], ticktext=['One', 'Two', 'Three'])) )
Which works as advertised 😄
131 Views
0
Answers
2 years ago
one year ago