Description Usage Arguments Details Value Note Author(s) See Also Examples
'plot' method implementation for 12-month quantile climate charts from output of function thornthwaite
(Thornthwaite and Mather's water balance).
1 2 3 4 5 |
x |
a list of quantile data frames of water balance variables to be plotted, as output of function |
save_dir |
name of destination directory for graphs (if any). Default is |
format |
graphic format of graphs; default is NULL (charts are sent to console). |
variables |
character vector of variables to be plotted. |
title |
logic. If |
trace_grid |
logic. If |
st_name |
name to be included into graphs titles. If NULL (default), no title is written. |
u_y_scale_magn |
magnification of range above upper limit, to set upper y-scale limit; default is 0. |
l_y_scale_magn |
magnification of range below lower limit, to set lower y-scale limit; default is 0.1. |
leg_pos |
legend position. Default is "topleft". If NULL, no legend is added. |
... |
arguments to be passed to methods, such as graphical parameters (see |
Default for plot variables is all those calculated by function thornthwaite: "Precipitation", "Et0", "Storage", "Prec. - Evap.", "Deficit", "Surplus". See function thornthwaite
for details on variables.
If format
is NULL (default), graphs are sent to the console. Otherwise, a file is produced and saved to the save_dir
directory. Values allowed are: "png", "jpeg", "tiff", "bmp".
l_y_scale_magn
and u_y_scale_magn
are the magnification coefficients (lower and upper, respectively), for y scale. If rng is the range between maximum and minimum values in all sets of series within a plot, the lower limit for y scale will be (rng * l_y_scale_magn
) below the lower value, and the upper limit will be (rng * u_y_scale_magn
) above the upper value of series.
Allowed values for leg_pos
are the same of x
in function legend
.
Most graphic parameters for functions plot
and legend
are accepted.
Charts of quantiles for water balance variables (12-month climatic values). They can be sent to the console or saved as graphic files.
A conflict is generated if parameters already used by the function are passed (e.g. x for legend
: use leg_pos
instead).
Emanuele Eccel
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | data(Trent_climate)
# quantiles is the list ("thornthwaite" S3 object)of quantile tables generated
# by function thornthwaite;
# it is the second element of the output list,
# which can be split into two separate lists (see function thornthwaite)
sta <- 1 # 1st station in the list of quantile tables
q_list=quantiles[[sta]]
class(q_list) <- "thornthwaite" ## q_list is coerced to a "thornthwaite" S3 object
plot(q_list,
st_name=names(quantiles)[sta], variables=c("Precipitation", "Et0"),
leg_pos = "topleft", col=c(1:6,1), pch=c(1:6,16),
lty=1, horiz=TRUE, y.intersp=0.1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.