Plots a vertical profile of data read in by a harp_read_<> function. There
are arguments for filtering the data to, for example station (SID), forecast
start time (fcst_dttm), lead time (lead_time), or valid time (valid_dttm) to
ensure that only the wanted data are plotted. There is also the option to
plot temperature (and / or) dewpoint temperature profiles on a skew-T / log -
P diagram.
Usage
plot_vertical_profile(
.data,
SID,
y_axis = "p",
reverse = TRUE,
log_scale = FALSE,
skew_t = FALSE,
colour_by = "fcst_model",
colours = NULL,
facet_by = NULL,
num_facet_cols = NULL,
...
)
# S3 method for harp_ens_point_df
plot_vertical_profile(
.data,
SID,
y_axis = "p",
reverse = TRUE,
log_scale = FALSE,
skew_t = FALSE,
colour_by = "fcst_model",
colours = NULL,
facet_by = NULL,
num_facet_cols = NULL,
fcst_dttm,
lead_time,
...
)
# S3 method for harp_list
plot_vertical_profile(
.data,
SID,
y_axis = "p",
reverse = TRUE,
log_scale = FALSE,
skew_t = FALSE,
colour_by = "fcst_model",
colours = NULL,
facet_by = NULL,
num_facet_cols = NULL,
fcst_dttm,
lead_time,
...
)
# S3 method for harp_det_point_df
plot_vertical_profile(
.data,
SID,
y_axis = "p",
reverse = TRUE,
log_scale = FALSE,
skew_t = FALSE,
colour_by = "fcst_model",
colours = NULL,
facet_by = NULL,
num_facet_cols = NULL,
fcst_dttm,
lead_time,
...
)
# S3 method for data.frame
plot_vertical_profile(
.data,
SID,
y_axis = "p",
reverse = TRUE,
log_scale = FALSE,
skew_t = FALSE,
colour_by = NULL,
colours = NULL,
facet_by = NULL,
num_facet_cols = NULL,
data_col,
valid_dttm,
...
)Arguments
- .data
A data frame, a
harp_point_dfdata frame or aharp_list.- SID
The station ID (if available) in
.datato plot- y_axis
The column in
.datacontaining the data to be used as the y-axis - i.e. the vertical position.- reverse
Logical - whether the y-axis should be reversed.
- log_scale
Logical - whether the y-axis should use a log10 scale.
- skew_t
Logical. Whether to plot the profile on a skew-T /log-P diagram.
- colour_by
The column in
.datathat will determine the line colour- colours
A character vector of colour codes. If this is a named vector, then the colour values will be matched to levels based on the names of the vectors. Can also be a data frame with column names equal to the value for
colour_byandcolour.- facet_by
The column in
.datato facet by.- ...
Other arguments passed on to layer(). These are often aesthetics, used to set an aesthetic to a fixed value, like linwidth = 4, or linetype = 3.
- fcst_dttm
The forecast start time in
.datato plot.- lead_time
The lead_time in
datato plot.- data_col
The column in
.datathat contains the data to plot as a vertical profile.- valid_dttm
If a
valid_dttmcolumn exists in.data, the valid time of the data to plot.
Value
A ggplot plot that can be saved with ggsave.