Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions 339-circular-dendrogram-with-ggraph.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ vertices$id=NA
myleaves=which(is.na( match(vertices$name, edges$from) ))
nleaves=length(myleaves)
vertices$id[ myleaves ] = seq(1:nleaves)
vertices$angle= 90 - 360 * vertices$id / nleaves
vertices$angle = 360 / nleaves * vertices$id + 110

# calculate the alignment of labels: right or left
# If I am on the left part of the plot, my labels have currently an angle < -90
vertices$hjust<-ifelse( vertices$angle < -90, 1, 0)
vertices$hjust<-ifelse( vertices$angle < 291, 1, 0)

# flip angle BY to make them readable
vertices$angle<-ifelse(vertices$angle < -90, vertices$angle+180, vertices$angle)
vertices$angle<-ifelse(vertices$angle < 291, vertices$angle+180, vertices$angle)

# Create a graph object
mygraph <- graph_from_data_frame( edges, vertices=vertices )
Expand All @@ -95,7 +95,8 @@ ggraph(mygraph, layout = 'dendrogram', circular = TRUE) +
legend.position="none",
plot.margin=unit(c(0,0,0,0),"cm"),
) +
expand_limits(x = c(-1.3, 1.3), y = c(-1.3, 1.3))
expand_limits(x = c(-1.3, 1.3), y = c(-1.3, 1.3)) +
coord_flip()
```
</div>
</div>
Expand Down
103 changes: 52 additions & 51 deletions 339-circular-dendrogram-with-ggraph.html

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions libs/accessible-code-block-0.0.1/empty-anchor.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Hide empty <a> tag within highlighted CodeBlock for screen reader accessibility (see https://github.com/jgm/pandoc/issues/6352#issuecomment-626106786) -->
// v0.0.1
// Written by JooYoung Seo (jooyoung@psu.edu) and Atsushi Yasumoto on June 1st, 2020.

document.addEventListener('DOMContentLoaded', function() {
const codeList = document.getElementsByClassName("sourceCode");
for (var i = 0; i < codeList.length; i++) {
var linkList = codeList[i].getElementsByTagName('a');
for (var j = 0; j < linkList.length; j++) {
if (linkList[j].innerHTML === "") {
linkList[j].setAttribute('aria-hidden', 'true');
}
}
}
});
6 changes: 3 additions & 3 deletions libs/navigation-1.1/codefolding.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ window.initializeCodeFolding = function(show) {
var currentIndex = 1;

// select all R code blocks
var rCodeBlocks = $('pre.r, pre.python, pre.bash, pre.sql, pre.cpp, pre.stan, pre.julia');
var rCodeBlocks = $('pre.r, pre.python, pre.bash, pre.sql, pre.cpp, pre.stan, pre.julia, pre.foldable');
rCodeBlocks.each(function() {

// create a collapsable div to wrap the code in
var div = $('<div class="collapse r-code-collapse"></div>');
if (show)
div.addClass('in');
show = (show || $(this).hasClass('fold-show')) && !$(this).hasClass('fold-hide');
if (show) div.addClass('in');
var id = 'rcode-643E0F36' + currentIndex++;
div.attr('id', id);
$(this).before(div);
Expand Down
10 changes: 6 additions & 4 deletions libs/tocify-1.9.1/jquery.tocify.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
margin-left: 2%;
position: fixed;
border: 1px solid #ccc;
webkit-border-radius: 6px;
moz-border-radius: 6px;
border-radius: 6px;
}

Expand Down Expand Up @@ -45,11 +43,15 @@
.tocify-subheader .tocify-subheader {
text-indent: 30px;
}

/* Further indents third level subheader elements. You can continue this pattern if you have more nested elements. */
.tocify-subheader .tocify-subheader .tocify-subheader {
text-indent: 40px;
}
.tocify-subheader .tocify-subheader .tocify-subheader .tocify-subheader {
text-indent: 50px;
}
.tocify-subheader .tocify-subheader .tocify-subheader .tocify-subheader .tocify-subheader {
text-indent: 60px;
}

/* Twitter Bootstrap Override Style */
.tocify .tocify-item > a, .tocify .nav-list .nav-header {
Expand Down
4 changes: 2 additions & 2 deletions libs/tocify-1.9.1/jquery.tocify.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,13 +386,13 @@

item.append($("<a/>", {

"text": self.text()
"html": self.html()

}));

} else {

item.text(self.text());
item.html(self.html());

}

Expand Down