wannesm / dtaidistance

Time series distances: Dynamic Time Warping (fast DTW implementation in C)
Other
1.08k stars 184 forks source link

how to reformat dense dendrogam plot #30

Closed momonala closed 5 years ago

momonala commented 5 years ago

Is there a recommended way to reformat the dendogram plot if there are many time series? Mine is quite dense and hard to read. My code:

im_name = 'pic.png'
cluster_model.plot(im_name, show_ts_label=names, show_tr_label=True)
ax.imshow(plt.imread(im_name))

Thanks!

image

wannesm commented 5 years ago

The solution is to create a figure that has a larger figsize and pas the axes to the plot method. Additionally you can change the margins to put the labels on different locations. See the example on https://dtaidistance.readthedocs.io/en/latest/usage/clustering.html