Skip to content

Commit

Permalink
Add a plot recipe for Plots.jl and Datasets (#22)
Browse files Browse the repository at this point in the history
* create a plot recipe for Dataset

* fix recipt

* add changelog entry

* bump version
  • Loading branch information
asinghvi17 authored and Datseris committed Jun 14, 2019
1 parent 0529853 commit 4bcb325
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# v1.1.0
- Added a recipe to plot `Datasets` as `Matrices` in `Plots.jl`

# v1.0.0
Nothing changed from the previous version. This is just the official 1.0 release in accordance with SymVer. :)
Nothing changed from the previous version. This is just the official 1.0 release in accordance with SemVer. :)

# v0.3.0

Expand Down
3 changes: 2 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name = "DelayEmbeddings"
uuid = "5732040d-69e3-5649-938a-b6b4f237613f"
repo = "https://github.com/JuliaDynamics/DelayEmbeddings.jl.git"
version = "1.0.3"
version = "1.1.0"

[deps]
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
NearestNeighbors = "b8a86587-4115-5ab1-83bc-aa920d37bbce"
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
Expand Down
10 changes: 10 additions & 0 deletions src/dataset.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using StaticArrays, LinearAlgebra
using Base.Iterators: flatten

import RecipesBase

export Dataset, AbstractDataset, minima, maxima
export minmaxima, columns

Expand Down Expand Up @@ -206,6 +208,14 @@ end
Base.show(io::IO, ::MIME"text/plain", d::AbstractDataset) = print(io, matstring(d))
Base.show(io::IO, d::AbstractDataset) = print(io, summary(d))

#####################################################################################
# Plotting #
#####################################################################################

# Support the plotting of Datasets-as-Matrices
RecipesBase.@recipe f(::Type{T}, vals::T) where {T<:AbstractDataset} = Matrix(vals)


#####################################################################################
# Minima and Maxima #
#####################################################################################
Expand Down

2 comments on commit 4bcb325

@Datseris
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/1381

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v1.1.0 -m "<description of version>" 4bcb3258766c56b040738da40babddb250b06279
git push origin v1.1.0

Please sign in to comment.