Changes between Version 4 and Version 5 of udg/ecoms/RPackage/examples/pointSelection


Ignore:
Timestamp:
Jun 17, 2014 12:40:34 PM (7 years ago)
Author:
juaco
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • udg/ecoms/RPackage/examples/pointSelection

    v4 v5  
    1414}}}
    1515
    16 The returned object contains all the necessary information for data representation (geo-location, time ...). In the next lines we plot the loaded time series for each member:
     16The returned object contains all the necessary information for data representation (geo-location, time ...). In the next lines we plot the loaded time series for each member. The element `Data` contains the data itself. In this case, it is a 2D array with the dimensions `time` (92 days for June, July and August) and `member` (10 members selected), as indicated by the `dimensions` attribute:
    1717
    1818{{{
     19> str(ex.point$Data)
     20 num [1:92, 1:10] 19.7 24.4 24.4 24.5 26.6 ...
     21 - attr(*, "dimensions")= chr [1:2] "time" "member"
    1922}}}
     23
     24In the following example we plot the time series with the multi-member mean and its dispersion (interquartilic range 25-75):
     25
     26{{{
     27> quartiles <- apply(ex.point$Data, MARGIN = 1, FUN = quantile, probs = c(.25,.75))
     28> ens.mean <- rowMeans(ex.point$Data)
     29> dates <- ex.point$Dates$start
     30> plot(dates, ens.mean, ylim = range(ex.point$Data), ty = 'n', ylab = "tas - 12UTC", xlab = "time")
     31> polygon(x = c(dates, rev(dates)), y = c(quartiles[1, ], rev(quartiles[2, ])), border = "transparent", col = rgb(0,0,1,.4))
     32> lines(dates, ens.mean)
     33}}}
     34
     35[[Image(image-20140617-123935.png)]]
     36
     37
    2038
    2139