mc_plot_image {myClim}R Documentation

Plot data - image

Description

Function plots single sensor form myClim data into PNG file with image() R base function. This was designed for fast, and easy data visualization especially focusing on missing values visualization and general data picture.

Usage

mc_plot_image(
  data,
  filename,
  title = "",
  localities = NULL,
  sensors = NULL,
  height = 1900,
  left_margin = 12,
  use_utc = TRUE
)

Arguments

data

myClim object see myClim-package

filename

output file name (file path)

title

of plot; default is empty

localities

names of localities; if NULL then all (default NULL)

sensors

names of sensors; if NULL then all (default NULL) see names(mc_data_sensors)

height

of image; default = 1900

left_margin

width of space for sensor_labels; default = 12

use_utc

if FALSE, then the time shift from tz_offset metadata is used to correct (shift) the output time-series (default TRUE)

In the Agg-format myClim object use_utc = FALSE is allowed only for steps shorter than one day. In myClim the day nd longer time steps are defined by the midnight, but this represent whole day, week, month, year... shifting daily, weekly, monthly... data (shift midnight) does not make sense in our opinion. But when user need more flexibility, then myClim Raw-format can be used, In Raw-format use_utc is not limited, user can shift an data without the restrictions. See myClim-package

Details

Be careful with bigger data. Can take some time.

Value

PNG file created as specified in output file name

Examples

tmp_dir <- tempdir()
tmp_file <- tempfile(tmpdir = tmp_dir)
mc_plot_image(mc_data_example_clean, tmp_file, "T1 sensor", sensors="TMS_T1")
file.remove(tmp_file)

[Package myClim version 1.1.0 Index]