Skip to content

Commit

Permalink
plotting fixes, random trajectories, and tweaks to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aarontrowbridge committed Feb 2, 2024
1 parent bb0a7c4 commit 2c1c0a3
Show file tree
Hide file tree
Showing 16 changed files with 729 additions and 525 deletions.
531 changes: 296 additions & 235 deletions Manifest.toml

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
name = "NamedTrajectories"
uuid = "538bc3a1-5ab9-4fc3-b776-35ca1e893e08"
authors = ["Aaron Trowbridge <aaron.j.trowbridge@gmail.com> and contributors"]
version = "0.1.4"
version = "0.1.5"

[deps]
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
Latexify = "23fbe1c1-3f47-55db-b15f-69d7ec21a316"
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
Unidecode = "967fb449-e509-55aa-8007-234b4096b967"

[compat]
CairoMakie = "0.10, 0.11"
CairoMakie = "0.11"
JLD2 = "0.4"
LaTeXStrings = "1.3"
Latexify = "0.16"
OrderedCollections = "1.6"
Reexport = "1.2"
Revise = "3.5"
Unidecode = "1.1"
julia = "1.8, 1.9"
julia = "1.9, 1.10"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
4 changes: 2 additions & 2 deletions build/methods.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Methods

export add_component!
export update!
export times
export get_times

using ..Types

Expand Down Expand Up @@ -83,7 +83,7 @@ function update!(traj::NamedTrajectory, comp::Symbol, data::AbstractMatrix{Float
traj.datavec = vec(view(traj.data, :, :))
end

function times(traj::NamedTrajectory, timestep_name::Union{Symbol, Nothing}=nothing)
function get_times(traj::NamedTrajectory, timestep_name::Union{Symbol, Nothing}=nothing)
if traj.dynamical_timesteps
@assert !isnothing(timestep_name)
return cumsum(vec(traj[timestep_name]))
Expand Down
6 changes: 3 additions & 3 deletions build/plotting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function plot(
Dict{Symbol, Union{Function, Vector{Function}}}(),

# style keyword arguments
res::Tuple{Int, Int}=(1200, 800),
size::Tuple{Int, Int}=(1200, 800),
titlesize::Int=25,
series_color::Symbol=:glasbey_bw_minc_20_n256,
ignored_labels::Union{Symbol, Vector{Symbol}, Tuple{Vararg{Symbol}}} =
Expand All @@ -37,10 +37,10 @@ function plot(
@assert all([key keys(traj.components) for key comps])
@assert all([key keys(traj.components) for key keys(transformations)])

ts = times(traj, timestep_name)
ts = get_times(traj, timestep_name)

# create figure
fig = Figure(resolution=res)
fig = Figure(size=fig_size)

# initialize axis count
ax_count = 0
Expand Down
Loading

2 comments on commit 2c1c0a3

@aarontrowbridge
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@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/100212

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

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 the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.5 -m "<description of version>" 2c1c0a3f8d0619d0c6b46ac9dce6717bba247687
git push origin v0.1.5

Please sign in to comment.