update doc
This commit is contained in:
parent
49fa679d9a
commit
69a47a24e8
6 changed files with 97 additions and 12 deletions
|
@ -2,6 +2,9 @@ using Statistics
|
|||
using Dates
|
||||
using Printf
|
||||
|
||||
"""
|
||||
Interactively parse log files and edit the log.
|
||||
"""
|
||||
function iedit_log(filenames...; writetofile = true)
|
||||
printstyled(stdout, "[CoordLog Editor] \n", color = :blue, bold = true)
|
||||
logs = CoordLog[]
|
||||
|
@ -118,6 +121,15 @@ function iedit_log(filenames...; writetofile = true)
|
|||
return edited_logs
|
||||
end
|
||||
|
||||
"""
|
||||
isplit_log!(
|
||||
logs::AbstractVector{CoordLog{T}},
|
||||
logid::Integer,
|
||||
pointid::Integer,
|
||||
) where {T}
|
||||
|
||||
Split the log. Supply notes interactively.
|
||||
"""
|
||||
function isplit_log!(
|
||||
logs::AbstractVector{CoordLog{T}},
|
||||
logid::Integer,
|
||||
|
@ -143,6 +155,11 @@ function isplit_log!(
|
|||
insert!(logs, logid + 1, new_logs[2])
|
||||
end
|
||||
|
||||
"""
|
||||
iedit_note!(logs::AbstractVector{CoordLog{T}}, logid::Integer) where {T}
|
||||
|
||||
Edit the note at `logid`. Supply new note interactively.
|
||||
"""
|
||||
function iedit_note!(logs::AbstractVector{CoordLog{T}}, logid::Integer) where {T}
|
||||
1 ≤ logid ≤ length(logs) ||
|
||||
throw(ArgumentError("logid out of index: ¬ 1 ≤ $(logid) ≤ $(length(logid))"))
|
||||
|
@ -151,6 +168,11 @@ function iedit_note!(logs::AbstractVector{CoordLog{T}}, logid::Integer) where {T
|
|||
logs[logid].note = note
|
||||
end
|
||||
|
||||
"""
|
||||
ijoin_logs!(logs::AbstractVector{CoordLog{T}}, logid1::Integer, logid2::Integer) where {T}
|
||||
|
||||
Join the logs at `logid1` and `logid2`. Supply new note interactively.
|
||||
"""
|
||||
function ijoin_logs!(logs::AbstractVector{CoordLog{T}}, logid1::Integer, logid2::Integer) where {T}
|
||||
1 ≤ logid1 ≤ length(logs) ||
|
||||
throw(ArgumentError("logid1 out of index: ¬ 1 ≤ $(logid1) ≤ $(length(logid1))"))
|
||||
|
|
|
@ -4,16 +4,29 @@ using ColorSchemes
|
|||
|
||||
"""
|
||||
Predefined color map functions.
|
||||
Receives
|
||||
- `cmap`: colormap
|
||||
- `logs`: vector of `CoordLog`
|
||||
- `n`: number of returning ticks
|
||||
|
||||
and returns tuple of
|
||||
1. vector of `Colorant`
|
||||
2. ticks to pass to `Colorbar`, which is a Tuple of
|
||||
1. vector of tick location (0 to 1)
|
||||
2. vector of tick labels (strings)
|
||||
|
||||
Any function (or struct) which behaves like this can be used for
|
||||
`lcolormapfunc` and `mcolormapfunc` kwargs of `trace2ds`.
|
||||
|
||||
# Types
|
||||
|
||||
[`ColorMapFunc`](@ref)
|
||||
[`ColorMapFunc`](@ref) is a supertype of all of these.
|
||||
|
||||
# Interface
|
||||
|
||||
Define these methods for the ColorMapFunc.
|
||||
|
||||
(AbstractVector{CoordLog}) -> Vector{∈ [0, 1]}, ticks
|
||||
(cmap, logs, n) -> Vector{Colorant}, ticks
|
||||
"""
|
||||
module ColorMapFuncs
|
||||
|
||||
|
@ -26,7 +39,8 @@ using Makie: wong_colors, Scene
|
|||
# Methods
|
||||
(f::ColorMapFunc)(cmap, logs)
|
||||
|
||||
Helper method.
|
||||
Helper struct for those use vector of 0 to 1 floats.
|
||||
Example functions are [`Date`](@ref) and [`Altitude`](@ref).
|
||||
"""
|
||||
abstract type ColorMapFunc end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue