Skip to content

Commit

Permalink
Merge pull request #93 from natetrux/gallery_updates
Browse files Browse the repository at this point in the history
Cookbook and Draw Options
  • Loading branch information
eaton-lab authored Aug 19, 2024
2 parents 38580c0 + 8731877 commit e420171
Show file tree
Hide file tree
Showing 12 changed files with 5,761 additions and 1,220 deletions.
410 changes: 410 additions & 0 deletions docs/barplot.ipynb

Large diffs are not rendered by default.

1,348 changes: 1,348 additions & 0 deletions docs/draw-options.ipynb

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions docs/gallery.md

This file was deleted.

987 changes: 987 additions & 0 deletions docs/heatmap.ipynb

Large diffs are not rendered by default.

194 changes: 194 additions & 0 deletions docs/highlights.ipynb

Large diffs are not rendered by default.

1,175 changes: 1,175 additions & 0 deletions docs/random-trees.ipynb

Large diffs are not rendered by default.

1,096 changes: 1,096 additions & 0 deletions docs/ridge-plot.ipynb

Large diffs are not rendered by default.

192 changes: 192 additions & 0 deletions docs/spacing.ipynb

Large diffs are not rendered by default.

1,255 changes: 191 additions & 1,064 deletions docs/tree-styles.ipynb

Large diffs are not rendered by default.

18 changes: 10 additions & 8 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ nav:
# - <span style="color:darkcyan; font-style:bold">Tree drawing</span>:
- Tree Drawing:
- draw basics: drawing-basics.ipynb
- draw options: ...
- draw options: draw-options.ipynb
- coordinates and axes: drawing-coordinates.ipynb
- composite plots: ...
- tree styles: tree-styles.ipynb
- builtin tree styles: tree-styles.ipynb
- save/export canvas: rendering.ipynb
- feature range-mapping: range-mapping.ipynb
- feature color-mapping: color-mapping.ipynb
- multitree tree grids: drawing-tree-grids.ipynb
- multitree cloud trees: drawing-cloud-trees.ipynb
# - composite plots
# - Modifying axes style: ...

- Consensus Trees: ...
Expand Down Expand Up @@ -132,7 +132,7 @@ nav:

- <i>.annotate</i> - add to drawings: ...

- <i>.rtree</i> - random trees: ...
- <i>.rtree</i> - random trees: random-trees.ipynb

# - networks:
# - drawing admixture edges: ...
Expand All @@ -144,10 +144,12 @@ nav:

- FAQs: FAQs.md

# Use this for the gallery: https://smarie.github.io/mkdocs-gallery/
- Cookbooks: gallery.md
# - barplot
# - heatmap
- Cookbooks:
- ToyTree with barplot: barplot.ipynb
- Spacing tree vs. tip names: spacing.ipynb
- Colored rectangles to highlight clades: highlights.ipynb
- Ridge plot: ridge-plot.ipynb
- ToyTree with matrix/heatmap: heatmap.ipynb
# - co-phylogeny
# - trait tree
# - unrooted trait tree in 2D (PCA)
Expand Down
295 changes: 154 additions & 141 deletions old_docs/Cookbook.ipynb

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions toytree/rtree/_src/rtree.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ def baltree(
# each node as the node distance from the root, to evenly create
# splits. 'dists' are later overwritten by extend_tips_to_align.

#check that ntips is even, if not raise an error
if ntips%2 != 0:
raise ToytreeError("Number of tips must be even to make a balanced tree!")

# get a root Node and keep track of nancestors
root = Node()

Expand Down

0 comments on commit e420171

Please sign in to comment.