Tag: 副标题

如何添加不同大小和颜色的ggplot2副标题?

我正在使用ggplot2来改善降雨条件。 这是我想要实现的一个可重复的例子: library(ggplot2) library(gridExtra) secu <- seq(1, 16, by=2) melt.d <- data.frame(y=secu, x=LETTERS[1:8]) m <- ggplot(melt.d, aes(x=x, y=y)) + geom_bar(fill="darkblue") + labs(x="Weather stations", y="Accumulated Rainfall [mm]") + opts(axis.text.x=theme_text(angle=-45, hjust=0, vjust=1), title=expression("Rainfall"), plot.margin = unit(c(1.5, 1, 1, 1), "cm"), plot.title = theme_text(size = 25, face = "bold", colour = "black", vjust = 5)) z <- arrangeGrob(m, […]

如何将标题添加到Matplotlib的子图中?

我有一个数字,其中包含许多子图。 fig = plt.figure(num=None, figsize=(26, 12), dpi=80, facecolor='w', edgecolor='k') fig.canvas.set_window_title('Window Title') # Returns the Axes instance ax = fig.add_subplot(311) ax2 = fig.add_subplot(312) ax3 = fig.add_subplot(313) 我如何给子图添加标题? fig.suptitle为所有graphics添加标题,虽然ax.set_title()存在,但后者不会为我的子图添加任何标题。 感谢您的帮助。 编辑:纠正了关于set_title()错字。 感谢Rutger Kassies