A number of molecules exhibit very complex solid-form landscapes with a range polymorphs, solvates, hydrates etc. The Packing Similarity Tool from CSD-Materials can be used to explore how the packing of these molecules varies between different solid forms. One way to view this information of packing similarity is to construct a dendrogram or tree diagram. This has previously been done by hand for carbamazepine (Cryst. Growth Des., 2009, 9, 1869–1888). The attached script performs the packing similarity and produces such a dendrogram using the CSD Python API and matplotlib.