Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

matplotlib plot title font size

from matplotlib import pyplot as plt    

fig = plt.figure()
plt.plot(data)
fig.suptitle('test title', fontsize=20)
plt.xlabel('xlabel', fontsize=18)
plt.ylabel('ylabel', fontsize=16)
fig.savefig('test.jpg')
Comment

axis font size matplotlib

import matplotlib.pyplot as plt

SMALL_SIZE = 8
MEDIUM_SIZE = 10
BIGGER_SIZE = 12

plt.rc('font', size=SMALL_SIZE)          # controls default text sizes
plt.rc('axes', titlesize=SMALL_SIZE)     # fontsize of the axes title
plt.rc('axes', labelsize=MEDIUM_SIZE)    # fontsize of the x and y labels
plt.rc('xtick', labelsize=SMALL_SIZE)    # fontsize of the tick labels
plt.rc('ytick', labelsize=SMALL_SIZE)    # fontsize of the tick labels
plt.rc('legend', fontsize=SMALL_SIZE)    # legend fontsize
plt.rc('figure', titlesize=BIGGER_SIZE)  # fontsize of the figure title
Comment

change title size matplotlib

ax[0].set_title("Random Excitation Signal", fontsize = 15)
Comment

change matplotlib fontsize

font = {'family' : 'normal',
        'weight' : 'bold',
        'size'   : 22}

matplotlib.rc('font', **font)
Comment

PREVIOUS NEXT
Code Example
Python :: discord.py add role on member join 
Python :: normalize image in cv2 
Python :: random date python 
Python :: how to delete na values in a dataframe 
Python :: how to time a python script 
Python :: python auto module installer 
Python :: how to remember to put a semicolon after your code 
Python :: permanent redirect django 
Python :: discord.py make command admin only 
Python :: max of two columns pandas 
Python :: majority in array python 
Python :: power set python 
Python :: bee movie script 
Python :: how to multiply in django template 
Python :: join list with comma python 
Python :: remove punctuation from string python 
Python :: how to save matplotlib figure to png 
Python :: rectangle in tkinter 
Python :: werkzeug.datastructures.filestorage to numpy 
Python :: sklearn random forest regressor 
Python :: pandas read_csv drop last column 
Python :: open choose files from file explorer python 
Python :: how to make a blank window open up in python 
Python :: mean squared error python 
Python :: tkinter load image 
Python :: python selenium move cursor to element 
Python :: install python3 centos 7.8 
Python :: suffixes in pandas 
Python :: python: transform as type numeirc 
Python :: openpyxl read excel 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =