-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7e8590c
commit f3e122c
Showing
5 changed files
with
69 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
""" | ||
Autocorrelation plotting with traja | ||
----------------------------------- | ||
Plot autocorrelation of a trajectory with :meth:`traja.plotting.plot_autocorrelation` | ||
Wrapper for pandas :meth:`pandas.plotting.autocorrelation_plot`. | ||
""" | ||
import traja | ||
|
||
trj = traja.generate() | ||
trj.traja.plot_autocorrelation('x') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
""" | ||
Plot PCA with traja | ||
----------------------------------- | ||
Plot PCA of a trip grid with :meth:`traja.plotting.plot_pca` | ||
Wrapper for pandas :meth:`pandas.plotting.autocorrelation_plot`. | ||
""" | ||
import traja | ||
|
||
# Load sample jaguar dataset with trajectories for 9 animals | ||
df = traja.dataset.example.jaguar() | ||
|
||
# Bin trajectory into a trip grid then perform PCA | ||
traja.plotting.plot_pca(df, id_col="ID", bins=(8,8)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
""" | ||
Periodogram plot with traja | ||
----------------------------------- | ||
Plot periodogram or power spectrum with :meth:`traja.plotting.plot_periodogram`. | ||
Wrapper for pandas :meth:`scipy.signal.periodogram`. | ||
""" | ||
import traja | ||
|
||
trj = traja.generate() | ||
trj.traja.plot_periodogram('x') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters