View source: R/plot_dat_in_map.R
function to plot data points on map of gridded data
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | plot_map_grid_points(
g_dat = NULL,
g_lon = NULL,
g_lat = NULL,
g_col = rainbow(10),
g_col_center = FALSE,
g_breaks,
g_nlev = 10,
p_lon = NULL,
p_lat = NULL,
p_col_info = "same",
p_col = rainbow(10),
p_col_center = FALSE,
p_dat,
p_legend = 0,
legend_center = FALSE,
xlims,
ylims,
zlims = NULL,
p_zlims,
mask = NULL,
mask_NA = NULL,
ratio = 1,
p_nlev = 10,
p_breaks = NA,
p_text,
p_pch = 21,
p_cex = 1,
p_pch_s = NA,
p_col_sig,
output = NULL,
outfile,
plot_scale = TRUE,
pwidth = 5,
graphic_device,
plot_title,
lwidth = 1,
plwidth = 1,
trend = FALSE,
topo = NULL,
text_cex = 1,
mask_col = "lightgrey",
NA_col = "white",
fc_plot = FALSE,
outliers = c(FALSE, FALSE),
units = "",
contour = NULL,
contourcol = "darkgrey",
...
)
|
g_lon, g_lat: |
arrays of longitudes and latidudes of dimension nx,ny ( or matrix of dim nx x ny if grid is not regular). |
g_breaks |
(g_nlev): breaks for plotting gridded data. If not provided, g_nlev needs to be specified to calculate breaks. If g_nlev is provided, the pretty() function is used to define the breakpoints and therefore the number of breaks might differ from the g_nlev. |
p_lon, p_lat: |
array of longitudes and latitudes of points of dimension np=number of points |
xlims, ylims: |
x and y limits of the plot. If not specified taken from g_lon and g_lat |
p_breaks |
(p_nlev): breaks for plotting point data. If p_breaks is not provided, p_nlev needs to be specified to calculate breaks. If p_col_info = "same" or "cpoints" values are taken from g_breaks (g_nlev). If p_nlev is provided, the pretty() function is used to define the breakpoints and therefore the number of breaks might differ from the p_nlev. |
pwidth |
width of plotting region of output (as input for jpeg, png, ...). height is calculated in functions based on plot layout |
graphic_device |
arguments for graphics devices (in addition to <<filename>>, <<width>> and <<height>> ), depending on the output chosen see |
plot_title |
(optional), character string for plot title |
lwidth |
width of legend |
plwidth |
width of legend for points |
topo |
Information for contour lines added to the plot. Named list with following three elements: alt=array of altitudes of dimension nlonXnlat, lon: array of longitudes, lat: array of latitudes. Default=NULL. |
fc_plot |
-> forecast plot, shows probabilities for all ncat forecast categories |
g_dat: |
matrix of gridded data of dimension nx x ny |
g_col: |
color scale for plotting gridded data as character of function |
p_dat: |
array of values for data for points of dimension p (needed for p_col_info = "same" or "cbar") |
p_col_info: |
type of coloring for points
|
p_col: |
colors for points, see p_col_info |
p_pch: |
pch of the points (see par). Values between 21:25 are implemented, default is 21. |
p_cex: |
cex of points (number or array), default is 2 |
p_legend: |
legend to be drawn for point data. Default is no legend. Legend is not drawn if p_col_info="same".
|
p_pch_s: |
x and y limits of the plot. If not specified taken from g_lon and g_lat |
mask: |
plot land-sea mask of data |
mask_col: |
color of mask values |
leg_labs: |
legend labs (for fc_plot=TRUE) |
fc_catnames: |
title for categories (for fc_plot=TRUE) |
leg_title |
title of legend |
output: |
needs to be specified if file output is wanted, currently only "png" is implemented (default=NA) |
outfile: |
character, outputfile (only if output is not NULL). final file will be of type outfile.output |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.