Python Forum
matplotlib using times italic fonts
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
matplotlib using times italic fonts
#4
I've solved , I wrote this line :

import matplotlib.font_manager as font_manager

font_dirs = ['/my/custom/font/dir', ]
font_files = font_manager.findSystemFonts(fontpaths=font_dirs)
font_list = font_manager.createFontList(font_files)
font_manager.fontManager.ttflist.extend(font_list)
in the base class (I've created a quality-plot hierarchy suitable for my purpose)

and then in the derived (final class) I had this line for example here times new roman :
mpl.rcParams['font.family'] = 'Times New Roman italic'
thank anyway for your help
Reply


Messages In This Thread
matplotlib using times italic fonts - by drudox - Aug-03-2018, 03:37 PM
RE: matplotlib using times italic fonts - by buran - Aug-03-2018, 03:48 PM
RE: matplotlib using times italic fonts - by drudox - Aug-03-2018, 04:05 PM
RE: matplotlib using times italic fonts - by drudox - Aug-04-2018, 10:57 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  python-docx- change lowercase to bold, italic Tmagpy 0 1,444 Jul-01-2022, 07:25 AM
Last Post: Tmagpy
  Matplotlib: How do I convert Dates from Excel to use in Matplotlib JaneTan 1 3,281 Mar-11-2021, 10:52 AM
Last Post: buran
  How can I write formatted (i.e. bold, italic, change font size, etc.) text to a file? JohnJSal 6 24,173 Jun-19-2018, 03:43 PM
Last Post: JohnJSal

Forum Jump:

User Panel Messages

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