[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-patch-tracker] [patch #10036] [octave forge] (statistics) Update
From: |
anonymous |
Subject: |
[Octave-patch-tracker] [patch #10036] [octave forge] (statistics) Update function dendrogram |
Date: |
Mon, 1 Mar 2021 13:47:40 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 |
URL:
<https://savannah.gnu.org/patch/?10036>
Summary: [octave forge] (statistics) Update function
dendrogram
Project: GNU Octave
Submitted by: None
Submitted on: Mon 01 Mar 2021 06:47:39 PM UTC
Category: Forge : new feature
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email: s.guidoni@virgilio.it
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
This patch improves a bit function dendrogram.
All the new features mimic the behaviour of the dendrogram function from
MATLAB.
Specify the maximum number of leaves to show:
P = 20;
dendrogram(tree, P); # the plot shows no more than 20 leaves, default is 30
Change the order of leaves:
order = optimalleaforder(tree, D);
dendrogram(tree, "Reorder", order); # the leaves are ordered according to
order
Change the orientation of the plot:
dendrogram(tree, "Orientation", "left"); # the plot is left to right
Get a handle to the plotted lines:
h = dendrogram(tree); # h is an array of handles
Get the numbers assigned to the leaves of the input tree:
[~,t] = dendrogram(tree); # t is a vector as long as the number of leaves of
tree
Get the order of the leaves as seen in the plot:
[~,~, permutation] = dendrogram(tree); # permutation is just the leaf order of
the plot
Not implemented:
* "CheckCrossing" to check the validity of the tree, e.g. when a custom leaf
order is given. I could add it in the future, by now just look at the
dendrogram.
* "ColorThreshold" to add a bit of colour to the clusters of the dendrogram: a
chore and, anyway, it can be done by changing the properties of the lines.
* "Labels" to change the labels of the plot: it can be done by changing the
properties of the axis.
Bonus: demo galore.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Mon 01 Mar 2021 06:47:39 PM UTC Name: dendrogram.diff Size: 14KiB
By: None
<http://savannah.gnu.org/patch/download.php?file_id=50963>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/patch/?10036>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-patch-tracker] [patch #10036] [octave forge] (statistics) Update function dendrogram,
anonymous <=