def plot_text_center(ax, text, fontsize=18):
    """
    Display text at the center of an ax from a matplotlib figure.

    Parameters
    ----------
    ax: plt.axes.Axes
        ax where to set centered text
    text: str
        text to display
    fontsize: int (default 18)
        font size of the text
    """
    left, width = 0.25, 0.5
    bottom, height = 0.25, 0.5
    right = left + width
    top = bottom + height
    ax.text(0.5 * (left + right), 0.5 * (bottom + top), text,
        horizontalalignment='center', verticalalignment='center', fontsize=
        fontsize, transform=ax.transAxes)
    ax.axis('off')
