Axis date format for a surface plot in Plotly
My date format for my axis labels works fine if the chart type is heatmap or contour, but when I make a surface plot, my date format is not taken, and a default format is used instead. I want the date format to show the month and day, leaving out the year. This is because the year goes on the y-axis, while the calendar day goes on the x-axis. I am using the year 2000 as a template for the x-axis dates, but I don't want the labels to say 2000. My workaround, for now, is to show the calendar date as a value from 0-365, but that makes the chart harder to understand.
How I formatted my labels:
2007 + + + +
2008 + + + +
2009 + + + +
2010 + + + +
Jan-1 Apr-1 Jul-1 Oct-1
How Plotly formats my labels in spite of my instructions
2007 + + + +
2008 + + + +
2009 + + + +
2010 + + + +
Jan 2000 Apr 2000 Jul 2000 Oct 2000
My ugly workaround:
2007 + + + +
2008 + + + +
2009 + + + +
2010 + + + +
0 91 182 274
Some relevant links:
- https://plotly.com/javascript/reference/surface/
- https://plotly.com/javascript/reference/layout/xaxis/#layout-xaxis-tickformat
Is there any way to get the dates formatted on the x-axis for a surface plot?
Topic plotly
Category Data Science