Repository: biolab/orange3

Issue:
Widget: Distance matrix -> no output
<!--
This is an issue template. Please fill in the relevant details in the
sections below.

Wrap code and verbatim terminal window output into triple backticks, see:
https://help.github.com/articles/basic-writing-and-formatting-syntax/#quoting-code

If you're raising an issue about an add-on (e.g. installed via
Options > Add-ons), raise an issue on the relevant add-on's issue
tracker instead. See: https://github.com/biolab?q=orange3
-->

##### Orange version
<!-- From menu _Help→About→Version_ or code `Orange.version.full_version` -->
3.13

##### Expected behavior
Distance matrix would generate data for scatter plot.


##### Actual behavior
Distance matrix widget does not give output.


##### Steps to reproduce the behavior
Distances -> Distance matrix -> Scatter plot (or Data Table


##### Additional info (worksheets, data, screenshots, ...)





Discussion:
This is because you need to make a selection in Distance Matrix. This will output selected data instances.

However, I think Selected Data would be a better name for the output, since it would correspond to the rest of the widgets that support selection.

Resolving patch:
diff --git a/Orange/widgets/unsupervised/owdistancematrix.py b/Orange/widgets/unsupervised/owdistancematrix.py
--- a/Orange/widgets/unsupervised/owdistancematrix.py
+++ b/Orange/widgets/unsupervised/owdistancematrix.py
@@ -208,7 +208,7 @@ class Inputs:
 
     class Outputs:
         distances = Output("Distances", DistMatrix, dynamic=False)
-        table = Output("Table", Table)
+        table = Output("Selected Data", Table, replaces=["Table"])
 
     settingsHandler = DistanceMatrixContextHandler()
     auto_commit = Setting(True)


Test patch:
diff --git a/Orange/widgets/tests/workflows/3_14_0_distance_matrix.ows b/Orange/widgets/tests/workflows/3_14_0_distance_matrix.ows
new file mode 100644
--- /dev/null
+++ b/Orange/widgets/tests/workflows/3_14_0_distance_matrix.ows
@@ -0,0 +1,78 @@
+<?xml version='1.0' encoding='utf-8'?>
+<scheme description="" title="" version="2.0">
+	<nodes>
+		<node id="0" name="File" position="(222.0, 131.0)" project_name="Orange3" qualified_name="Orange.widgets.data.owfile.OWFile" title="File" version="" />
+		<node id="1" name="Distances" position="(357.0, 142.0)" project_name="Orange3" qualified_name="Orange.widgets.unsupervised.owdistances.OWDistances" title="Distances" version="" />
+		<node id="2" name="Distance Matrix" position="(511.0, 150.0)" project_name="Orange3" qualified_name="Orange.widgets.unsupervised.owdistancematrix.OWDistanceMatrix" title="Distance Matrix" version="" />
+		<node id="3" name="Scatter Plot" position="(712.0, 144.0)" project_name="Orange3" qualified_name="Orange.widgets.visualize.owscatterplot.OWScatterPlot" title="Scatter Plot" version="" />
+	</nodes>
+	<links>
+		<link enabled="true" id="0" sink_channel="Data" sink_node_id="1" source_channel="Data" source_node_id="0" />
+		<link enabled="true" id="1" sink_channel="Distances" sink_node_id="2" source_channel="Distances" source_node_id="1" />
+		<link enabled="true" id="2" sink_channel="Data" sink_node_id="3" source_channel="Table" source_node_id="2" />
+	</links>
+	<annotations />
+	<thumbnail />
+	<node_properties>
+		<properties format="pickle" node_id="0">gAN9cQAoWBIAAABjb250cm9sQXJlYVZpc2libGVxAYhYDAAAAHJlY2VudF9wYXRoc3ECXXEDKGNP
+cmFuZ2Uud2lkZ2V0cy51dGlscy5maWxlZGlhbG9ncwpSZWNlbnRQYXRoCnEEKYFxBX1xBihYBwAA
+AGFic3BhdGhxB1gzAAAAL1VzZXJzL2FqZGEvb3JhbmdlL29yYW5nZTMvT3JhbmdlL2RhdGFzZXRz
+L2lyaXMudGFicQhYBgAAAHByZWZpeHEJWA8AAABzYW1wbGUtZGF0YXNldHNxClgHAAAAcmVscGF0
+aHELWAgAAABpcmlzLnRhYnEMWAUAAAB0aXRsZXENWAAAAABxDlgFAAAAc2hlZXRxD2gOWAsAAABm
+aWxlX2Zvcm1hdHEQTnViaAQpgXERfXESKGgHWEcAAAAvVXNlcnMvYWpkYS9Eb3dubG9hZHMvRGF0
+YSBzZXRzL3dpbmUtcmV2aWV3cy93aW5lbWFnLWRhdGFfZmlyc3QxNTBrLmNzdnETaAlOaAtOaA1o
+DmgPaA5oEE51YmgEKYFxFH1xFShoB1g2AAAAL1VzZXJzL2FqZGEvb3JhbmdlL29yYW5nZTMvT3Jh
+bmdlL2RhdGFzZXRzL3RpdGFuaWMudGF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hxQWg7SwBoDohlXXFCKFgEAAAAaXJpc3FDY09yYW5nZS5kYXRhLnZhcmlhYmxlCkRpc2Ny
+ZXRlVmFyaWFibGUKcURLAVgsAAAASXJpcy1zZXRvc2EsIElyaXMtdmVyc2ljb2xvciwgSXJpcy12
+aXJnaW5pY2FxRYllZXNoKksBdVgKAAAAYXR0cmlidXRlc3FGKFgMAAAAc2VwYWwgbGVuZ3RocUdL
+AoZxSFgLAAAAc2VwYWwgd2lkdGhxSUsChnFKWAwAAABwZXRhbCBsZW5ndGhxS0sChnFMWAsAAABw
+ZXRhbCB3aWR0aHFNSwKGcU50cU9YBQAAAG1ldGFzcVApWAoAAABjbGFzc192YXJzcVFYBAAAAGly
+aXNxUl1xUyhYCwAAAElyaXMtc2V0b3NhcVRYDwAAAElyaXMtdmVyc2ljb2xvcnFVWA4AAABJcmlz
+LXZpcmdpbmljYXFWZYZxV4VxWFgSAAAAbW9kaWZpZWRfdmFyaWFibGVzcVldcVp1YmF1Lg==
+</properties>
+		<properties format="literal" node_id="1">{'autocommit': True, 'axis': 0, 'controlAreaVisible': True, 'metric_idx': 0, 'normalized_dist': True, 'savedWidgetGeometry': b'\x01\xd9\xd0\xcb\x00\x02\x00\x00\x00\x00\x03\x84\x00\x00\x01\xac\x00\x00\x04h\x00\x00\x02\xb0\x00\x00\x03\x84\x00\x00\x01\xc2\x00\x00\x04h\x00\x00\x02\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00', '__version__': 2}</properties>
+		<properties format="pickle" node_id="2">gAN9cQAoWAsAAABhdXRvX2NvbW1pdHEBiFgSAAAAY29udHJvbEFyZWFWaXNpYmxlcQKIWBMAAABz
+YXZlZFdpZGdldEdlb21ldHJ5cQNDMgHZ0MsAAgAAAAACZgAAASkAAAWFAAADMgAAAmYAAAE/AAAF
+hQAAAzIAAAAAAAAAAAgAcQRYCwAAAF9fdmVyc2lvbl9fcQVLAVgQAAAAY29udGV4dF9zZXR0aW5n
+c3EGXXEHY09yYW5nZ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RpbmdzcRVdcRZjT3JhbmdlLndpZGdldHMuc2V0dGluZ3MKQ29u
+dGV4dApxFymBcRh9cRkoWAQAAAB0aW1lcRpHQdbNJM31WJJYBgAAAHZhbHVlc3EbfXEcKFgGAAAA
+YXR0cl94cR1YDAAAAHNlcGFsIGxlbmd0aHEeS2aGcR9YBgAAAGF0dHJfeXEgWAsAAABzZXBhbCB3
+aWR0aHEhS2aGcSJoCH1xIyhYCgAAAGF0dHJfY29sb3JxJFgEAAAAaXJpc3ElS2WGcSZYCgAAAGF0
+dHJfbGFiZWxxJ05K/v///4ZxKFgKAAAAYXR0cl9zaGFwZXEpTkr+////hnEqWAkAAABhdHRyX3Np
+emVxK05K/v///4ZxLHVoFEsCdVgKAAAAYXR0cmlidXRlc3EtfXEuKGgeSwJoIUsCWAwAAABwZXRh
+bCBsZW5ndGhxL0sCWAsAAABwZXRhbCB3aWR0aHEwSwJoJUsBdVgFAAAAbWV0YXNxMX1xMnViYXUu
+</properties>
+	</node_properties>
+	<session_state>
+		<window_groups />
+	</session_state>
+</scheme>