Python Forum
How to change font size of chart title and axis title ?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to change font size of chart title and axis title ?
#3
IT appears you have to integrate this into your code
from openpyxl.chart.text import RichText
from openpyxl.drawing.text import Paragraph, ParagraphProperties, CharacterProperties, Font    

font_test = Font(typeface='Calibri')
cp = CharacterProperties(latin=font_test, sz=1500)
chart.x_axis.txPr = RichText(p=[Paragraph(pPr=ParagraphProperties(defRPr=cp), endParaRPr=cp)])
Recommended Tutorials:
Reply


Messages In This Thread
RE: How to change font size of chart title and axis title ? - by metulburr - Nov-09-2017, 08:03 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How can I write formatted (i.e. bold, italic, change font size, etc.) text to a file? JohnJSal 13 29,157 May-20-2025, 12:26 PM
Last Post: hanmen9527
Question [split] How to ask Smart Questions (thread title expansion) darkuser 4 1,715 Nov-11-2024, 01:27 PM
Last Post: deanhystad
  IndexError: index 31 is out of bounds for axis 0 with size 31 YL789 1 1,062 Sep-21-2024, 09:46 AM
Last Post: Gribouillis
  Python code for alignment and font size 1418 0 1,035 Jan-14-2024, 03:56 AM
Last Post: 1418
  IndexError: index 10 is out of bounds for axis 0 with size 10 Mehboob 11 11,368 Sep-14-2023, 06:54 AM
Last Post: Mehboob
  read active document name - other than from the window title ineuw 0 1,042 Sep-11-2023, 09:06 AM
Last Post: ineuw
  Change font in a list or tuple apffal 4 3,922 Jun-16-2023, 02:55 AM
Last Post: schriftartenio
  Problem with scraping the Title from a web page Wagner822 0 1,342 Jun-29-2022, 11:31 PM
Last Post: Wagner822
  Change Text Size in Console? ShakeyPakey 9 15,926 Dec-09-2021, 02:51 AM
Last Post: drvlwho
  Sample labels from excel file in order to put them on x-axis and y-axis of a plot hobbyist 11 7,207 Sep-14-2021, 08:29 AM
Last Post: hobbyist

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020