Description Usage Arguments Details Value
Interactively edit a path of twilight locations.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | pathEdit(
path,
twilights,
offset = 0,
fixed = FALSE,
aspect = 1,
extend = 3,
auto.advance = FALSE,
plotMap = NULL,
plot.overlay = NULL,
is.invalid = function(path) logical(nrow(path)),
point.cex = 0.5,
width = 12,
height = 4,
map.width = 8,
map.height = 8,
palette = defaultPalette[c(5, 2, 1, 12, 12, 1)],
...
)
|
path |
a two column matrix of the (lon,lat) locations at the twilight times. |
twilights |
dataframe of twilight times as generated by
|
offset |
the starting hour for the vertical axes. |
fixed |
logical vector indicating which locations to hold fixed. |
aspect |
aspect ratio of the map. |
extend |
the number of locations before and after the current location to highlight. |
auto.advance |
advance to next point afet edit. |
plotMap |
A function to plot the background map. |
plot.overlay |
A function to overlay twilight specific data on the map. |
is.invalid |
A function that indicates if a location is not valid. |
point.cex |
expansion factor for plot points. |
width |
width of the selection window. |
height |
height of the selection window. |
map.width |
width of the map window. |
map.height |
height of the map window. |
palette |
a colour palette of 6 colours. |
... |
additional arguments passed to plot.overlay |
Interactively edit a path of twilight locations. A plot of the estimated sunrise and sunset times is displayed, and the user can select the location corresponding to a particular twilight with a left mouse click.
The path is dislayed in another window, with the editable location highlighted. The user can select the point to edit with a left mouse click, or move the editable location with a right mouse click. In auto advance mode, when a location is edited, the editable location advances to the next location in the sequence.
In either window
'q' | Quits, returning the dataframe of edited twilight segments |
'a' | Toggle auto advance mode |
'r' | Resets the zoom to the encompass the entire track |
'c' | Centres the zoomed window on the current point |
'z' | Zooms to the locations surrounding the current location |
'u' | Resets any edits to the current point |
'+'/'-' | Zoom in or out |
'Left arrow' | Jump to previous location |
'Right arrow' | Jump to next location |
'0'-'9' | Set the mode of the overlay plot |
The user may supply a function plotMap
that plots a
background map. This must be a function of two arguments
xlim
and ylim
the determine the extent of the plot.
The user may also supply a function plot.overlay
that
overlays twilight specific data on the map. This must be a
function of six arguments, mode
is an integer flag used to
indicate the style of the overlay plot, twilights
is the
dataframe of twilight data, index
is the index of the
current twilight, xlim
and ylim
determine the extent
of the plot, and ...
is used to pass any additional
arguments. The mode of the overlay plot is set with the keys 0 to
9. We adopt the convention that mode 0 suppresses the overlay, but
this is not enforced.
The user may also supply a function is.invalid
that accepts
the current path as an argument and returns a logical vector
indicating which locations along the path are in some way invalid.
The twilights for these locations will be highlighted.
a two column matrix of (lon,lat) locations.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.