Skip to content

Commit

Permalink
Merge pull request #60 from baggepinnen/noplots
Browse files Browse the repository at this point in the history
remove Plots.jl from dependencies
  • Loading branch information
baggepinnen authored Oct 18, 2023
2 parents fa871ce + c25cee8 commit 8955bc0
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
9 changes: 5 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "DynamicAxisWarping"
uuid = "aaaaaaaa-4a10-5553-b683-e707b00e83ce"
authors = ["Fredrik Bagge Carlson <[email protected]>"]
version = "0.4.16"
version = "0.4.17"

[deps]
BinDeps = "9e28174c-4ba2-5203-b857-d8d62c4213ee"
Expand All @@ -11,8 +11,8 @@ Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
LoopVectorization = "bdcacae8-1622-11e9-2a5c-532679323890"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
SlidingDistancesBase = "25b0cc0c-38e4-462f-a11d-8564868c562d"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Expand All @@ -27,8 +27,8 @@ DelimitedFiles = "1"
Distances = "0.8, 0.9, 0.10"
FillArrays = "1"
LoopVectorization = "0.9, 0.10, 0.11, 0.12"
Plots = "1.0"
ProgressMeter = "1.2"
RecipesBase = "1.0"
Requires = "1.0"
SlidingDistancesBase = "0.2, 0.3"
StatsBase = "0.32, 0.33"
Expand All @@ -40,6 +40,7 @@ ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
LightGraphs = "093fc24a-ae57-5d10-9952-331d41423f4d"
MatrixProfile = "24e37439-14ec-4097-bda3-6a65822e2305"
QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"

[targets]
test = ["MatrixProfile", "LightGraphs", "QuadGK", "ForwardDiff"]
test = ["MatrixProfile", "LightGraphs", "QuadGK", "ForwardDiff", "Plots"]
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ plot(mp1, mp2)
The function `dtwnn` searches for a pattern in a long time series. By default, it *does not normalize* the data over each window, to do this, pass, e.g., `ZNormalizer` as the fifth argument.

```julia
using DynamicAxisWarping, Distances
using DynamicAxisWarping, Distances, Plots
radius = 5
a = sin.(0.1 .* (1:100)) .+ 0.1 .* randn.()
b = sin.(0.1 .* (1:100_000)) .+ 0.1 .* randn.()
Expand Down Expand Up @@ -216,6 +216,7 @@ profile = matrix_profile(y, m, DTW(radius, [transportcost]))
## `transportcost`
`transportcost` adds an additional penalty multiplier for "transporting", i.e., deviations from the Euclidean matching. The standard DTW distance does not consider this added cost and the default is 1. A value greater than 1 multiplies the cost of moving horizontally or vertically in the coupling matrix, promoting a diagonal move, corresponding to the standard Euclidean matching. The influence of the transport cost can be visualized with
```julia
using DynamicAxisWarping, Plots
a = sin.(1:100); b = sin.(1:100) .+ randn.();
dtwplot(a,b, transportcost=1) # Default
dtwplot(a,b, transportcost=1.01) # Should be "more diagonal"
Expand Down
2 changes: 1 addition & 1 deletion src/DynamicAxisWarping.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ using DataStructures
using SlidingDistancesBase
import SlidingDistancesBase: floattype, lastlength, setup_normalizer
using LoopVectorization
using Plots, Plots.PlotMeasures # Plots required both for @layout and for the margins
using RecipesBase
using Requires
using UnPack

Expand Down
11 changes: 7 additions & 4 deletions src/plots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,13 @@ handleargs(h; kwargs...) = handleargs(h.args...; kwargs...)
layout --> 1
end

left_margin --> 0mm
bottom_margin --> 0mm
top_margin --> 0mm
right_margin --> 0mm
plots_id = Base.PkgId(Base.UUID("91a5bcdd-55d7-5caf-9e0b-520d859cae80"), "Plots")
Plots = Base.loaded_modules[plots_id]

left_margin --> 0Plots.mm
bottom_margin --> 0Plots.mm
top_margin --> 0Plots.mm
right_margin --> 0Plots.mm

# heatmap
@series begin
Expand Down

0 comments on commit 8955bc0

Please sign in to comment.