Circular diagram using sankey in Python -


i work on jupyter, python 2.7. want set cycle circle arrow diagram. able start question: circular arrow flow chart in python

that's code far:

import numpy np import matplotlib.pyplot plt  matplotlib.sankey import sankey  fig = plt.figure() pos = [3, 1] color = 'w' fontsize= 16 ax = fig.add_subplot(1, 1, 1, xticks=[], yticks=[], title ="intelligence cycle") flows = [pos[1], -pos[1]] sankey = sankey(ax=ax, gap=0.5, scale=1.0/pos[0])  sankey.add(facecolor='darkslateblue',            flows=flows,            labels = ["identify need",none],            orientations=[-1,0]           )  sankey.add(facecolor='blueviolet',            flows=flows,            labels = ["collect",none],            orientations=[0,-1],prior = 0, connect=(1, 0)           )  sankey.add(facecolor='cornflowerblue',            flows=flows,            labels = ["process",none],            orientations=[-1,0],prior = 1, connect=(1, 0)           )  sankey.add(facecolor='royalblue',            flows=flows,            labels = ["analyse",none],            orientations=[0,-1],prior = 2, connect=(1, 0)           )  #sankey.add(facecolor='b', #           flows=flows, #           labels = ["communicate",none], #           orientations=[-1,1],prior = 3, connect=(1, 0) #          )  diagrams = sankey.finish() diagram in diagrams:     diagram.text.set_fontweight('bold')     diagram.text.set_fontsize(fontsize)     diagram.text.set_color(color) plt.show(fig) 

it works 4 arrows closed circle of 4 arrows

but when unquote 5th, can't manage make closed circle. have checked out questions sankey in python, none correspond i'm trying do.


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -