问题
Is it possible to change the angle of the text on an axis in XlsxWriter?
In Excel, you would do this:
Format Axis > Alignment > Text Layout > Custom Angle: -70
And I think a VB macro would look like this:
ActiveChart.Axes(xlCategory).TickLabels.Orientation = -70 ' degrees
I don't see anything in the XlsxWriter docs about this.
回答1:
There is set_x_axis
(set_y_axis) method for such cases i think.
chart.set_x_axis({'name_font': {'bold': True, 'italic': True}})
Here is link into docs.
来源:https://stackoverflow.com/questions/27427877/change-angle-of-text-on-axis