Computes the data structure for the Hovmoller plots
Computes the data structure for the Hovmoller plots
This function creates the data structure for Hovmoller plots for either latitude or longitude. This function can take either a stars object or a dataframe. Input arguments differ for each case. The function autoplot can plot this object.
hovmoller(x, lat_or_lon ="lat", xlen =NULL,...)## S3 method for class 'data.frame'hovmoller( x, lat_or_lon ="lat", xlen =NULL, lat_or_lon_col, t_col, z_col,...)## S3 method for class 'stars'hovmoller(x, lat_or_lon ="lat", xlen =NULL,...)## S3 method for class 'hovmoller'autoplot( object, ylab ="Day", xlab =NULL, title ="", palette ="Spectral", legend_title ="z",...)
Arguments
x: A stars object or a dataframe. Arguments differ according to the input type.
lat_or_lon: Needs to be either lat or lon. lat plots the latitudinal Hovmoller plat, while lon plots the longitudinal Hovmoller plot.
xlen: The length of the xaxis for latitude/longitude.
...: Other arguments currently ignored.
lat_or_lon_col: For dataframes: the column or the column name corresponding to the latitude/longitude.
t_col: For dataframes: the time column. Time must be a set of discrete integer values.
z_col: For dataframes: the The quantity of interest that will be plotted. Eg. temperature.
object: For autoplot: the output of the function `hovmoller'.
ylab: The y label.
xlab: The x label.
title: The graph title.
palette: The color palette. Default is Spectral.
legend_title: The title for the legend.
Returns
An object of hovmoller class containing the original data and the Hovmoller data.