-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Heatmap with dendrogram #94
Comments
wow, that would be huge contribution! Do I understand correctly you are using lets-plot Kotlin API? |
yes, correct, we use Kotlin API |
in this event let me transfer you to the LPK project. Disregard scary notifications. |
We didn't plan to release dendrogram any time soon and if you are willing to put efforts in this task it would be great. The 1st step would be implement dendrogram as a separate plot similar to the ggdendro package. I.e. using geom_segment() and perhaps geom_text(). Dendrogram API we can put to the "jetbrains.letsPlot.bistro" package next to CorrPlot. Dont worry about plot orientation - we are releasing The next step would be the heatmap combo. We don't have 'marginal plot' feature yet so unfortunately you will have to compute sizes and positions of plots manually and use GGBunch to combine heatmap and dendrograms in one figure. How does it sound? |
Hi Igor, thank you very much for a quick response. We looked in the sources of With best wishes, |
Sounds great! |
Hi Stanislav, how is dendrogram going? Doc: ggmarginal. |
Hi Igor, I've implemented heatmap and dendrogram, but not in a conventional ggplot way, so I'm not sure how it could be helpful for the lets-plot project; there are fundamentally things which may not be done in a ggplot way (e.g. several different fill scales etc). Our library (just made it public, its in the wip, no docs still; the license will be changed later to apache) combines ggpubr, ggdendro, heatmap2 and other addon packages for ggplot. I will be happy to discuss with you how we can make it more useful for lets-plot project! Few examples: Heatmaps with clusteringval plt = Heatmap(
TestData.sampleMatrix(15, 15), "x", "y", "z",
xOrder = Hierarchical(),
yOrder = Hierarchical()
)
.withBorder()
.withColorKey(
"xcat", Top,
sep = 0.1, pallete = Categorical.Triadic9Bright,
label = "X Cat", labelPos = Left, labelSep = 0.2, labelSize = 2.0
)
.withColorKey(
"ycat", Right,
sep = 0.1, pallete = Categorical.Triadic9Bright,
label = "Y Cat", labelPos = Top, labelSep = 0.2, labelSize = 2.0, labelAngle = 90.0
)
.withDendrogram(Top)
.withDendrogram(Right)
.withLabels(Left, sep = 0.2)
.withLabels(Bottom, sep = 0.2, angle = 45)
.withFillLegend(Bottom, title = "Awesome Z label", textSize = 1.5, sizeUnit = "x") Dendroval tree =
root {
repeat(2) {
node {
repeat(2) {
node {
repeat(2) {
node {
repeat(2) {
node()
}
}
}
}
}
}
}
}
GGDendroPlot(
tree,
rpos = Left
) {
color = label
}
.withLabels(label)
.withAlignmentLayer(alignment) StatisticsGGBoxPlot(
toothGrowth,
x = "dose",
y = "len"
) {
fill = "dose"
} + statCompareMeans(
allComparisons = true,
method = TestMethod.KruskalWallis,
multipleGroupsMethod = TestMethod.KruskalWallis
) + statCompareMeans() |
Hi Stanislav, congratulations, it looks awesome! Not sure what the second |
The last |
Dear Colleagues,
we are very exited using your library in our projects and thank you for developing it. Our team is quite eager to know whether you have plans to add a dendrogram and heatmap with dendrogram in the upcoming releases? If you don't have such plans and since we need these kind of plots very much, probably you may give us a guide how we can implement these plots, then we will be able to make a proper PR.
Warm regards,
Stanislav
The text was updated successfully, but these errors were encountered: