[問題] 長條圖標題與X軸標籤字體大小調整
各位好,不好意思又遇到問題上網找不到答案,再麻煩幫忙。謝謝大家
問題:
建立長條圖後想要修改圖表標題字體大小跟圖表X軸標籤字體大小,我的程式碼如下。謝謝
chart =arChart()
chart.type "col"
chart.style 10
chart.title "CP W1_CLIP"
chart.gapWidth 500
chart.legend Legend()
chart.legend.position 'b'
chart.legend.layout None
chart.legend.overlay False
data = Reference(ws_new,in_col=2,in_row=1,ax_col=len(weeks)+1,ax_row=len(vend_names)+1)
cats = Reference(ws_new,in_col=1,in_row=2,ax_row=len(vend_names)+1)
chart.add_data(data,itles_from_data=True)
chart.set_categories(cats)
ws_new.add_chart(chart, "I2")
target_value 0.8
target_data [target_value] *en(vend_names)
target_ref Reference(ws_new,in_col=len(weeks) + 2,in_row=1,ax_row=len(vend_names) + 1)
for, value in enumerate(target_data, start=2):
ws_new.cell(row=i, column=len(weeks) + 2, value=value)
line_chartineChart()
line_chart.add_data(target_ref,itles_from_data=True)
line_chart.set_categories(cats)
for series inine_chart.series:
series.graphicalProperties.line.solidFill "FF0000"
series.graphicalProperties.line.width 9525 * 2
chart +=ine_chart
chart.width 36
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 42.79.73.88 (臺灣)
※ 文章網址: https://www.ptt.cc/bbs/Python/M.1718469407.A.33C.html
推
06/18 19:25,
5月前
, 1F
06/18 19:25, 1F
→
06/18 19:52,
5月前
, 2F
06/18 19:52, 2F
→
06/18 19:52,
5月前
, 3F
06/18 19:52, 3F
→
06/18 19:52,
5月前
, 4F
06/18 19:52, 4F
→
06/18 19:52,
5月前
, 5F
06/18 19:52, 5F
→
06/18 19:53,
5月前
, 6F
06/18 19:53, 6F
推
06/23 10:31,
4月前
, 7F
06/23 10:31, 7F
→
06/24 09:29,
4月前
, 8F
06/24 09:29, 8F
→
06/24 09:29,
4月前
, 9F
06/24 09:29, 9F
→
07/03 20:47,
4月前
, 10F
07/03 20:47, 10F
討論串 (同標題文章)
完整討論串 (本文為第 1 之 2 篇):
Python 近期熱門文章
PTT數位生活區 即時熱門文章