With the help of sankey-toolbox in Matplotlib, we can plot sankey-diagrams automaticly: The position of a sankey-object is automaticly calculated based on the position of its prior-object and cannot be given manually; and when a sankey-diagram is initialized, the position of the first sankey-object will be assigned with the input of an axis. (the (0,0)-point will be the center-point of this object)
And Here is the situation: i want to draw two sankey diagrams with a given y-offset, and several ports of the two diagrams should be connected. Therefore are two coordinate systems with y-offset in the same subplot required. I have tried the ‘add_axes‘ method, but with this method a new subplot is created and there will be a graphic scaling problem.
Now this is the question: Is it possible to create a new coordinate system with a given y-offset, without creating subplot?
Not really a complete answer, but it might help you to find the solution:
sankey.add()supports atransformkeyword argument. Depending on your figure, create a newtransforminstance, and use it for the shifted part of your figure:In order to create the new transform, the helper function
matplotlib.transforms.offset_copy()may also be useful: