I'm (still) having trouble setting the color of lines drawn by Dendrogram. They are too faint for the publisher - I would prefer them to be Black.
Here is an example:
sMD =
{
{1, {1, 1, 1, 0, 1, 1, 0, 1}},
{2, {0, 1, 1, 0, 0, 0, 1, 1}},
{3, {0, 1, 0, 1, 0, 1, 0, 0}},
{4, {0, 1, 0, 0, 0, 0, 1, 1}},
{5, {0, 1, 1, 1, 0, 0, 0, 1}},
{6, {1, 1, 1, 0, 0, 1, 1, 0}},
{7, {0, 0, 0, 0, 1, 0, 1, 0}},
{8, {1, 1, 0, 1, 0, 1, 1, 1}}
};
sMDcount = Length[sMD];
jaccardEdgeDistances = Flatten[
Table[
Table[
{sMD[[i, 1]] \[UndirectedEdge] sMD[[j, 1]],
Total[If[# == 0, 0, 1] & /@ (sMD[[i, 2]] - sMD[[j, 2]])]}, (*
we are counting mismatches *)
{j, i + 1, sMDcount}
],
{i, 1, sMDcount - 1}
],
1];
jDhash = CreateDataStructure["HashTable"];
jDhash["Insert", Sort[#[[1]]] -> #[[2]]] & /@ jaccardEdgeDistances;
jDhash["Insert", ReverseSort[#[[1]]] -> #[[2]]] & /@
jaccardEdgeDistances;
jDsup = 100*Max[jaccardEdgeDistances[[;; , 2]]];
elabelSize = 9;
iInches = 7/3;
jdD = Dendrogram[
sMD[[;; , 1]],
DistanceFunction -> (If[#1 == #2, 0,
If[jDhash["KeyExistsQ", #1 \[UndirectedEdge] #2],
jDhash["Lookup", #1 \[UndirectedEdge] #2], jDsup]] &),
ClusterDissimilarityFunction -> "WeightedAverage",
BaseStyle -> Directive[FontFamily -> "Arial", Black, elabelSize],
Axes -> {False, True},
AxesOrigin -> {5, 0},
AxesStyle -> Black,
AspectRatio -> 1.1,
ImageSize -> {72*iInches, 72*iInches}
];
Print[jdD];
faintDendrogramFilename = "FaintDendrogram.jpg";
Print[];
If[! True,
Print[InputForm[faintDendrogramFilename], " not written"],
(* else *)
faintDendrogramFile =
FileNameJoin[{appDir, faintDendrogramFilename}];
Export[faintDendrogramFile, jdD, ImageResolution -> 1200];
Print["wrote ", InputForm[faintDendrogramFilename]];
];