10

是否可以使 x-tick 标签跨越两行?说,如果我的 x-tick 标签是

January 2008, February 2008, March 2008

我希望他们

January  February  March
  2008     2008    2008

我不想旋转它们。

4

1 回答 1

12

After a quick test using the code I found here, it appears that it does indeed work if you just add a newline in your tick label. e.g.

mytics=['January\n2008', 'February\n2008', 'March\n2008']
于 2012-07-11T14:11:29.207 回答