Treating your data a Distance Matrix, will also result in a common legend. The multiple legends are being displayed, because every column has a different range, thus a separate legend. If you just want to get rid of all of the legends except one, the code below will illustrate how to do that....but I am not sure that is what you want to do.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\Drosophila Aging Distances.jmp" );
hc = Hierarchical Cluster(
Y(
:ORE_FEMALE_WK1_1,
:ORE_FEMALE_WK1_2,
:ORE_FEMALE_WK1_11,
:ORE_FEMALE_WK1_12,
:ORE_FEMALE_WK1_21,
:ORE_FEMALE_WK1_24,
:ORE_FEMALE_WK6_1,
:ORE_FEMALE_WK6_2,
:ORE_FEMALE_WK6_11,
:ORE_FEMALE_WK6_12,
:ORE_FEMALE_WK6_21,
:ORE_FEMALE_WK6_24,
:ORE_MALE_WK1_3,
:ORE_MALE_WK1_4,
:ORE_MALE_WK1_9,
:ORE_MALE_WK1_10,
:ORE_MALE_WK1_19,
:ORE_MALE_WK1_20,
:ORE_MALE_WK6_3,
:ORE_MALE_WK6_4,
:ORE_MALE_WK6_9,
:ORE_MALE_WK6_10,
:ORE_MALE_WK6_19,
:ORE_MALE_WK6_20,
:SAM_FEMALE_WK1_7,
:SAM_FEMALE_WK1_8,
:SAM_FEMALE_WK1_15,
:SAM_FEMALE_WK1_16,
:SAM_FEMALE_WK1_22,
:SAM_FEMALE_WK1_23,
:SAM_FEMALE_WK6_7,
:SAM_FEMALE_WK6_8,
:SAM_FEMALE_WK6_15,
:SAM_FEMALE_WK6_16,
:SAM_FEMALE_WK6_22,
:SAM_FEMALE_WK6_23,
:SAM_MALE_WK1_5,
:SAM_MALE_WK1_6,
:SAM_MALE_WK1_13,
:SAM_MALE_WK1_14,
:SAM_MALE_WK1_17,
:SAM_MALE_WK1_18,
:SAM_MALE_WK6_5,
:SAM_MALE_WK6_6,
:SAM_MALE_WK6_13,
:SAM_MALE_WK6_14,
:SAM_MALE_WK6_17,
:SAM_MALE_WK6_18
),
Label( :Observation ID ),
Method( "Ward" ),
Standardize Data( 1 ),
Legend( 1 ),
Dendrogram Scale( "Distance Scale" ),
Number of Clusters( 5 ),
Color Map( "Blue to Gray to Red" ),
SendToReport( Dispatch( {}, "Dendrogram", OutlineBox, {SetHorizontal( 1 )} ) )
);
For( i = 48, i > 1, i--,
Report( hc )[Table Box( i )] << delete
);
Jim