bsrn.visualization.availability.plot_bsrn_availability#
- bsrn.visualization.availability.plot_bsrn_availability(stations, username, password, start_year=1992, end_year=None, output_file=None, title=None)[source]#
Unified function to plot bsrn file availability from ftp. 统一功能,用于绘制FTP中的BSRN文件可用性。
- Parameters:
stations (str or list) – One or more station abbreviations (e.g., ‘PAY’ or [‘PAY’, ‘NYA’]). 一个或多个站点缩写(例如 ‘PAY’ 或 [‘PAY’, ‘NYA’])。
username (str) – BSRN FTP username. BSRN FTP 用户名。
password (str) – BSRN FTP password. BSRN FTP 密码。
start_year (int, default 1992) – year to start the visualization. 可视化开始的年份。
end_year (int, optional) – year to end the visualization. If not specified, the current year is used. 可视化结束的年份。如果未指定,则使用当前年份。
output_file (str, optional) – Path to the output file (e.g., ‘availability.pdf’). 输出文件的路径(例如 ‘availability.pdf’)。
title (str, optional) – Plot title. If None (default), no title is drawn. 图标题;默认 None 不显示。
- Returns:
fig – The generated availability heatmap figure. 生成的可用性热图对象。
- Return type:
plotnine.ggplot.ggplot