Skip to content

Commit

Permalink
Add param to control y of suptitle
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuang11 committed Apr 18, 2020
1 parent 7499b42 commit a5d9d0b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion holoviews/plotting/mpl/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,9 @@ class LayoutPlot(GenericLayoutPlot, CompositePlot):
Specifies the space between vertically adjacent elements in the grid.
Default value is set conservatively to avoid overlap of subplots.""")

suptitle_y = param.Number(default=0.98, doc="""
The y location of the layout title in figure coordinates.""")

fontsize = param.Parameter(default={'title':16}, allow_None=True)

# Whether to enable fix for non-square figures
Expand Down Expand Up @@ -1097,7 +1100,8 @@ def initialize_plot(self):
title_obj = None
title = self._format_title(key)
if self.show_title and len(self.coords) > 1 and title:
title_obj = self.handles['fig'].suptitle(title, **self._fontsize('title'))
title_obj = self.handles['fig'].suptitle(title, **self._fontsize('title'),
y=self.suptitle_y)
self.handles['title'] = title_obj
self.handles['bbox_extra_artists'] += [title_obj]

Expand Down

0 comments on commit a5d9d0b

Please sign in to comment.