Skip to content

Plot title should be shifted up when xticks are set to the top of the plot #1415

Closed
@ppurka

Description

@ppurka

This is an issue that came up in http://trac.sagemath.org/13625

When subplot.xaxis.tick_top() is used, then the position of the plot title is not recomputed. Ideally, it should be shifted further up. Example code is as follows

from matplotlib.figure import Figure
figure = Figure()
subplot = figure.add_subplot(111)
subplot.plot(range(10),range(10))
subplot.xaxis.tick_top()
subplot.set_title('a title')
from matplotlib.backends.backend_agg import FigureCanvasAgg
figure.set_canvas(FigureCanvasAgg(figure))
figure.savefig('/tmp/a.png')

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions