cancel
Showing results for 
Search instead for 
Did you mean: 
Warehousing & Analytics
Engage in discussions on data warehousing, analytics, and BI solutions within the Databricks Community. Share insights, tips, and best practices for leveraging data for informed decision-making.
cancel
Showing results for 
Search instead for 
Did you mean: 

Change the default font for plots

Andrea_
New Contributor

Hi community, 

As the title says, I have been checking the documentation, but I could not find clear references to my question.

I am working in a project, and I need to change all the plots fonts to match a specific brand. All plots are generated with the default font, and I was wondering if it would be possible to change this setting.

I am aware it is possible to import the fonts by using something like:

fm.FontProperties(fname=font_path)
and changing the font in each individual plot.
 
However, I am generating a big number of them and manually updating one by one would be complex and prone to errors.
 
Thanks in advance for any hints!
3 REPLIES 3

SebastianRowan
Contributor

Set plt.rcParams['font.family'] = 'YourBrandFontName' at the start and all your plots will follow that font automatically, most probably.

kheliidiyua33
New Contributor II

Manually updating each plot would definitely get messy at scale. Using global font configuration seems like the cleaner approach for maintaining consistent branding across all visual outputs.

One more thing I forgot to mention: using a global fonts configuration should also make future style updates much easier to apply across every plot.