a list of quantile data frames of water balance variables to be plotted, as output of function thornthwaite.
save_dir
name of destination directory for graphs (if any). Default is NULL.
format
graphic format of graphs; default is NULL (charts are sent to console).
variables
character vector of variables to be plotted.
title
logic. If TRUE inserts titles in charts.
trace_grid
logic. If TRUE (default) adds a grid.
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 par).
Details
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.
Value
Charts of quantiles for water balance variables (12-month climatic values). They can be sent to the console or saved as graphic files.
Note
A conflict is generated if parameters already used by the function are passed (e.g. x for legend: use leg_pos instead).
Author(s)
Emanuele Eccel
See Also
thornthwaite
Examples
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)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(ClimClass)
Loading required package: geosphere
Loading required package: sp
Loading required package: ggplot2
Loading required package: reshape2
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/ClimClass/plot.thornthwaite.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plot.thornthwaite
> ### Title: Thornthwaite - Mather's quantile plot
> ### Aliases: plot.thornthwaite
>
> ### ** Examples
>
> 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)
>
>
>
>
>
> dev.off()
null device
1
>