How to write a plot title in more than one line using suptitle?

Question:

Here is an example:

fig.suptitle('Lorem ipsum dolor sit amet, consectetur adipiscing elit donec nec condimentum libero. Phasellus condimentum porttitor congue morbi eget quam sed justo egestas lobortis aenean et erat metus')

How to make this title in 3 lines?

Asked By: user3261475

||

Answers:

Just insert a newline character n where you want the new line.

import matplotlib.pyplot as plt
fig = plt.figure()
fig.suptitle('This sentence isnbeing splitninto three lines')
plt.show()
Answered By: Ronny Andersson
import matplotlib.pyplot as plt

plt.title(r'This plot title is''n displayed in two rows')
plt.show()
Answered By: Jamuna Prakash
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.