Subset of heat_tree_matrix

47 views
Skip to first unread message

Laurent Cauquil

unread,
Oct 13, 2020, 6:17:19 AM10/13/20
to metacoder
Hello Zachary,

I would like to produce a subset of a heat_tree_matrix.
For example, in your last plot in the page https://grunwaldlab.github.io/metacoder_documentation/example.html, I would like to plot only the comparisons between the nose and others sites resulting in the first line of plot.
I almost succeeded on my data, but there is still the frame of all comparisons

Thanks in advance.

Laurent

Zachary Foster

unread,
Oct 13, 2020, 2:44:11 PM10/13/20
to metacoder
Hello Laurent,

There is no way to do that with the heat_tree_matrix function, but its a good idea for a feature in the future. I can imagine two ways of doing it now:

1) make each plot individually and combine them into a single plot (this is how heat_tree_matrix works). In the example analysis you linked, each plot would be made in the same way as the plot in the "Comparing two treatments/groups" section, except you would not add labels or legends and always use the same random seed (to make the layout always the same). The labelled key plot would be the same tree but with the node color set to grey. There are multiple pacakges that let you combine plots, such as cowplot.

2) Kindof a hack, but works. Edit the output of a full heat_tree_matrix by hand using a program like inkscape (free) or photoshop. If you save the plot as SVG or PDF, then you can rearrange and resize parts without loss of quality.  You can just delete the plots you dont want and scale the others to look nice.

Let me know if you have questions.

Best,

Zach

Laurent Cauquil

unread,
Oct 15, 2020, 3:38:33 AM10/15/20
to metacoder
Ok, thank you for your response.
I will try the first option, the reproducible way.

Best,

Laurent
Reply all
Reply to author
Forward
0 new messages