Hi all! I'm experiencing a strange behaviour with sankey diagram. As you can see from the attached image, the patch label it's not positioned in the middle of the patch (as it should), but it's plotted over the first label... The code is attached also. Any hints?
Thanks, Giovanni
#!/usr/bin/env python # -*- coding: utf-8 -*- import matplotlib.pyplot as plt from matplotlib.sankey import Sankey inFlows = [45000] outFlows = [-8250,-6250,-6000,-484] outFlows.append(-(sum(inFlows) + sum(outFlows))) flowLabels = ['uno', 'due', 'tre', 'quattro', 'cinque', 'sei'] flowDir = [] for i in inFlows: flowDir.append(0) for i in outFlows: flowDir.append(-1) flowDir.pop() flowDir.append(0) myDia = Sankey(scale = 1.0/float(inFlows[0])) myDia.add(flows = inFlows+outFlows, orientations = flowDir, labels = flowLabels, patchlabel = 'Patch\nLabel', ) myDia.finish() plt.show()
<<attachment: sankey_test.png>>
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users