timeseries: General timeseries plotting function

Description Usage Arguments Value Author(s) Examples

View source: R/timeseries.R

Description

Plot one (or more) timeseries plots.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
timeseries( tsData,
            printLegend = TRUE,
            snapshotsPerTimeInt = 1000,
            timeUnit = "ns",
            valueName = NA,
            valueUnit = NA,
            colours = NA,
            names = NA,
            legendPosition = "bottomright",
            barePlot = FALSE,
            ... )

Arguments

tsData

List of (alternating) indices and response values, as also produced by load_timeseries() for example.

printLegend

Boolean, which triggers plotting of the legend.

snapshotsPerTimeInt

Number, specifying how many snapshots are within one timeUnit.

timeUnit

Specifies, which unit the x-axis is given in.

valueName

Name of response variable.

valueUnit

Specifies, which unit the y-axis is given in.

colours

Vector of colours used for plotting.

names

Vector of the names of the trajectories.

legendPosition

Indicate position of legend: either "bottomright", "bottomleft", "topleft" or "topright".

barePlot

Boolean, indicating whether the plot is to be made without any additional information.

...

Additional arguments (ellipsis).

Value

Returns a list of list, the latter each holding for every data input series:

Author(s)

Christian Margreitter

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# GROMOS
timeseries( load_timeseries( c( system.file( "extdata/timeseries_example_1.txt.gz",
                                             package = "MDplot" ),
                                system.file( "extdata/timeseries_example_2.txt.gz",
                                             package = "MDplot" ) ) ),
            snapshotsPerTimeInt = 100 )

# GROMACS
timeseries( load_timeseries( c( system.file( "extdata/timeseries_example_GROMACS.txt.gz",
                                             package = "MDplot" ) ),
                             mdEngine = "GROMACS" ),
            ylim = c( 0.545, 0.7 ), valueName = "Area per lipid", valueUnit = "nm^2" )

Example output

Loading required package: MASS
Loading required package: RColorBrewer
Loading required package: gplots

Attaching package: 'gplots'

The following object is masked from 'package:stats':

    lowess

Loading required package: gtools
[[1]]
[[1]]$minValue
[1] -863.2769

[[1]]$maxValue
[1] -600.0456

[[1]]$meanValue
[1] -727.3879

[[1]]$sd
[1] 38.60625


[[2]]
[[2]]$minValue
[1] -613.2769

[[2]]$maxValue
[1] -350.0456

[[2]]$meanValue
[1] -477.3879

[[2]]$sd
[1] 38.60625


[[1]]
[[1]]$minValue
[1] 0.593398

[[1]]$maxValue
[1] 0.611528

[[1]]$meanValue
[1] 0.6026445

[[1]]$sd
[1] 0.003798379


[[2]]
[[2]]$minValue
[1] 0.612394

[[2]]$maxValue
[1] 0.657255

[[2]]$meanValue
[1] 0.6306351

[[2]]$sd
[1] 0.009447535


[[3]]
[[3]]$minValue
[1] 0.632033

[[3]]$maxValue
[1] 0.669266

[[3]]$meanValue
[1] 0.6464662

[[3]]$sd
[1] 0.005998402


[[4]]
[[4]]$minValue
[1] 0.594977

[[4]]$maxValue
[1] 0.632142

[[4]]$meanValue
[1] 0.6132043

[[4]]$sd
[1] 0.007607988


[[5]]
[[5]]$minValue
[1] 0.622705

[[5]]$maxValue
[1] 0.652738

[[5]]$meanValue
[1] 0.6361768

[[5]]$sd
[1] 0.005281864


[[6]]
[[6]]$minValue
[1] 0.591421

[[6]]$maxValue
[1] 0.627509

[[6]]$meanValue
[1] 0.60832

[[6]]$sd
[1] 0.008239306

MDplot documentation built on May 2, 2019, 7:02 a.m.

Related to timeseries in MDplot...