Thank you. However, in my situation, we have 2,000 compounds in total. We have 100 compounds that belong to different KEGG pathway modules (we want compounds that belong to the same pathway module to be closer together). The remaining 1,900 compounds has a "quadruple tree" structure connected with these 100 compound. As a result, it would be hard to adjust the position of these 100 compounds after plotting all these 2,000 compounds.
I will at least try to plot based on the partial layout matrix to see whether it works.