{"id":17366,"date":"2026-07-09T12:25:13","date_gmt":"2026-07-09T16:25:13","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/?p=17366"},"modified":"2026-07-09T12:25:13","modified_gmt":"2026-07-09T16:25:13","slug":"sankey-diagrams-in-matlab","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2026\/07\/09\/sankey-diagrams-in-matlab\/","title":{"rendered":"Sankey diagrams in MATLAB"},"content":{"rendered":"<div class = rtcContent><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span class=\"_richTextNode\">Mike's pick this week is <\/span><a href = \"https:\/\/uk.mathworks.com\/matlabcentral\/fileexchange\/128679-sankey-plot\"><span class=\"_richTextNode\">sankey plot<\/span><\/a><span class=\"_richTextNode\"> by <\/span><a href = \"https:\/\/uk.mathworks.com\/matlabcentral\/profile\/authors\/18192500\"><span class=\"_richTextNode\">Zhaoxu Liu \/ slandarer<\/span><\/a><span class=\"_richTextNode\"> nominated by <\/span><a href = \"https:\/\/uk.mathworks.com\/matlabcentral\/profile\/authors\/642467\"><span class=\"_richTextNode\">Yair Altman<\/span><\/a><span class=\"_richTextNode\">. <\/span><\/div><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span class=\"_richTextNode\">Sankey diagrams visualize flows, of energy, money, materials, people, anything that moves from one place to another, where the width of each arrow is proportional to the quantity flowing. According to Wikipedia, Sankey diagrams are named after Irish Captain<\/span><span class=\"_richTextNode\"> <\/span><a href = \"https:\/\/en.wikipedia.org\/wiki\/Matthew_Henry_Phineas_Riall_Sankey\"><span class=\"_richTextNode\">Matthew Henry Phineas Riall Sankey<\/span><\/a><span class=\"_richTextNode\">, who used this type of diagram in 1898 in to show the<\/span><span class=\"_richTextNode\"> energy efficiency <\/span><span class=\"_richTextNode\">of a<\/span><span class=\"_richTextNode\"> steam engine.<\/span><span class=\"_richTextNode\"> <\/span><\/div><div  style = 'margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span class=\"_richTextNode\">slandarer's file exchange entry brings these diagrams to MATLAB and they are beautiful! Here are a few examples from the package taken from the 20+ included<\/span><\/div><div style=\"background-color: #F5F5F5; margin: 10px 0 10px 0;\"><div class=\"inlineWrapper\"><div  style = 'border-left: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-top: 1px solid rgb(217, 217, 217); border-bottom: 0px none rgb(33, 33, 33); border-radius: 4px 4px 0px 0px; padding: 6px 45px 0px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace, Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 14px; '><span style=\"white-space: pre\"><span >links={<\/span><span style=\"color: rgb(167, 9, 245);\">'a1'<\/span><span >,<\/span><span style=\"color: rgb(167, 9, 245);\">'A'<\/span><span >,1.2;<\/span><span style=\"color: rgb(167, 9, 245);\">'a2'<\/span><span >,<\/span><span style=\"color: rgb(167, 9, 245);\">'A'<\/span><span >,1;<\/span><span style=\"color: rgb(167, 9, 245);\">'a1'<\/span><span >,<\/span><span style=\"color: rgb(167, 9, 245);\">'B'<\/span><span >,.6;<\/span><span style=\"color: rgb(167, 9, 245);\">'a3'<\/span><span >,<\/span><span style=\"color: rgb(167, 9, 245);\">'A'<\/span><span >,1; <\/span><span style=\"color: rgb(167, 9, 245);\">'a3'<\/span><span >,<\/span><span style=\"color: rgb(167, 9, 245);\">'C'<\/span><span >,0.5;<\/span><\/span><\/div><\/div><div class=\"inlineWrapper\"><div  style = 'border-left: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace, Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 14px; '><span style=\"white-space: pre\"><span >    <\/span><span style=\"color: rgb(167, 9, 245);\">'b1'<\/span><span >,<\/span><span style=\"color: rgb(167, 9, 245);\">'B'<\/span><span >,.4; <\/span><span style=\"color: rgb(167, 9, 245);\">'b2'<\/span><span >,<\/span><span style=\"color: rgb(167, 9, 245);\">'B'<\/span><span >,1;<\/span><span style=\"color: rgb(167, 9, 245);\">'b3'<\/span><span >,<\/span><span style=\"color: rgb(167, 9, 245);\">'B'<\/span><span >,1; <\/span><span style=\"color: rgb(167, 9, 245);\">'c1'<\/span><span >,<\/span><span style=\"color: rgb(167, 9, 245);\">'C'<\/span><span >,1;<\/span><\/span><\/div><\/div><div class=\"inlineWrapper\"><div  style = 'border-left: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace, Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 14px; '><span style=\"white-space: pre\"><span >    <\/span><span style=\"color: rgb(167, 9, 245);\">'c2'<\/span><span >,<\/span><span style=\"color: rgb(167, 9, 245);\">'C'<\/span><span >,1;  <\/span><span style=\"color: rgb(167, 9, 245);\">'c3'<\/span><span >,<\/span><span style=\"color: rgb(167, 9, 245);\">'C'<\/span><span >,1;<\/span><span style=\"color: rgb(167, 9, 245);\">'A'<\/span><span >,<\/span><span style=\"color: rgb(167, 9, 245);\">'AA'<\/span><span >,2; <\/span><span style=\"color: rgb(167, 9, 245);\">'A'<\/span><span >,<\/span><span style=\"color: rgb(167, 9, 245);\">'BB'<\/span><span >,1.2;<\/span><\/span><\/div><\/div><div class=\"inlineWrapper\"><div  style = 'border-left: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace, Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 14px; '><span style=\"white-space: pre\"><span >    <\/span><span style=\"color: rgb(167, 9, 245);\">'B'<\/span><span >,<\/span><span style=\"color: rgb(167, 9, 245);\">'BB'<\/span><span >,1.5; <\/span><span style=\"color: rgb(167, 9, 245);\">'B'<\/span><span >,<\/span><span style=\"color: rgb(167, 9, 245);\">'AA'<\/span><span >,1.5; <\/span><span style=\"color: rgb(167, 9, 245);\">'C'<\/span><span >,<\/span><span style=\"color: rgb(167, 9, 245);\">'BB'<\/span><span >,2.3; <\/span><span style=\"color: rgb(167, 9, 245);\">'C'<\/span><span >,<\/span><span style=\"color: rgb(167, 9, 245);\">'AA'<\/span><span >,1.2};<\/span><\/span><\/div><\/div><div class=\"inlineWrapper\"><div  style = 'border-left: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace, Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 14px; '>&nbsp;<\/div><\/div><div class=\"inlineWrapper\"><div  style = 'border-left: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace, Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 14px; '><span style=\"white-space: pre\"><span >SK = SSankey(links(:,1), links(:,2), links(:,3));<\/span><\/span><\/div><\/div><div class=\"inlineWrapper outputs\"><div  style = 'border-left: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-top: 0px none rgb(33, 33, 33); border-bottom: 1px solid rgb(217, 217, 217); border-radius: 0px; padding: 0px 45px 4px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace, Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 14px; '><span style=\"white-space: pre\"><span >SK.draw()<\/span><\/span><\/div><div  style = 'color: rgb(33, 33, 33); padding: 10px 0px 6px 17px; background: rgb(255, 255, 255) none repeat scroll 0% 0% \/ auto padding-box border-box; font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 14px; overflow-x: hidden; line-height: 17.234px; '><div class=\"inlineElement eoOutputWrapper disableDefaultGestureHandling embeddedOutputsFigure\" uid=\"B10345CD\" prevent-scroll=\"true\" data-testid=\"output_0\" style=\"width: 1289.33px;\" tabindex=\"-1\"><div class=\"outputLayer selectedOutputDecorationLayer doNotExport\" aria-hidden=\"true\"><\/div><div class=\"outputLayer scrollableOutputDecorationLayer doNotExport\" aria-hidden=\"true\"><\/div><div class=\"outputLayer navigationFocusLayer doNotExport\" aria-hidden=\"false\" role=\"application\" tabindex=\"-1\"><\/div><div class=\"outputLayer activeOutputDecorationLayer doNotExport\" aria-hidden=\"false\" role=\"application\"><\/div><div class=\"figureElement eoOutputContent\" role=\"article\" aria-roledescription=\"Use Browse Mode to explore \" aria-description=\"figure output \"><img decoding=\"async\" class=\"figureImage figureContainingNode\" src=\"https:\/\/blogs.mathworks.com\/pick\/files\/POTWSankey_1.png\" style=\"width: 560px;\"><\/div><\/div><\/div><\/div><\/div><div style=\"background-color: #F5F5F5; margin: 10px 0 10px 0;\"><div class=\"inlineWrapper\"><div  style = 'border-left: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-top: 1px solid rgb(217, 217, 217); border-bottom: 0px none rgb(33, 33, 33); border-radius: 4px 4px 0px 0px; padding: 6px 45px 0px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace, Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 14px; '><span style=\"white-space: pre\"><span style=\"color: rgb(0, 128, 19);\">%% <\/span><span style=\"color: rgb(0, 128, 19);\">sankey<\/span><span style=\"color: rgb(0, 128, 19);\"> demo20 :Rotate the Sankey diagram by 90 degrees to make it vertical<\/span><\/span><\/div><\/div><div class=\"inlineWrapper\"><div  style = 'border-left: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace, Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 14px; '><span style=\"white-space: pre\"><span >figure(<\/span><span style=\"color: rgb(167, 9, 245);\">'Name'<\/span><span >,<\/span><span style=\"color: rgb(167, 9, 245);\">'sankey demo20'<\/span><span >, <\/span><span style=\"color: rgb(167, 9, 245);\">'Units'<\/span><span >,<\/span><span style=\"color: rgb(167, 9, 245);\">'normalized'<\/span><span >, <\/span><span style=\"color: rgb(167, 9, 245);\">'Position'<\/span><span >,[.05,.1,.4,.7])<\/span><\/span><\/div><\/div><div class=\"inlineWrapper\"><div  style = 'border-left: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace, Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 14px; '><span style=\"white-space: pre\"><span >A12 = [1,2,1; 1,2,3; 5,0,1];<\/span><\/span><\/div><\/div><div class=\"inlineWrapper\"><div  style = 'border-left: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace, Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 14px; '><span style=\"white-space: pre\"><span >A23 = [1,4,2; 3,1,0; 0,3,2];<\/span><\/span><\/div><\/div><div class=\"inlineWrapper\"><div  style = 'border-left: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace, Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 14px; '><span style=\"white-space: pre\"><span >adjMat = mergeAdjMat({A12, A23});<\/span><\/span><\/div><\/div><div class=\"inlineWrapper\"><div  style = 'border-left: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace, Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 14px; '><span style=\"white-space: pre\"><span >SK = SSankey([],[],[], <\/span><span style=\"color: rgb(167, 9, 245);\">'AdjMat'<\/span><span >,adjMat);<\/span><\/span><\/div><\/div><div class=\"inlineWrapper\"><div  style = 'border-left: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace, Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 14px; '><span style=\"white-space: pre\"><span >SK.NodeList = {<\/span><span style=\"color: rgb(167, 9, 245);\">'AAA'<\/span><span >,<\/span><span style=\"color: rgb(167, 9, 245);\">'BBB'<\/span><span >,<\/span><span style=\"color: rgb(167, 9, 245);\">'CCC'<\/span><span >,<\/span><span style=\"color: rgb(167, 9, 245);\">'prop1'<\/span><span >,<\/span><span style=\"color: rgb(167, 9, 245);\">'prop2'<\/span><span >,<\/span><span style=\"color: rgb(167, 9, 245);\">'prop3'<\/span><span >,<\/span><span style=\"color: rgb(167, 9, 245);\">'set1'<\/span><span >,<\/span><span style=\"color: rgb(167, 9, 245);\">'set2'<\/span><span >,<\/span><span style=\"color: rgb(167, 9, 245);\">'set3'<\/span><span >};<\/span><\/span><\/div><\/div><div class=\"inlineWrapper\"><div  style = 'border-left: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace, Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 14px; '><span style=\"white-space: pre\"><span >SK.RenderingMethod = <\/span><span style=\"color: rgb(167, 9, 245);\">'left'<\/span><span >;<\/span><\/span><\/div><\/div><div class=\"inlineWrapper\"><div  style = 'border-left: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace, Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 14px; '><span style=\"white-space: pre\"><span >SK.ValueLabelLocation = <\/span><span style=\"color: rgb(167, 9, 245);\">'left'<\/span><span >;<\/span><\/span><\/div><\/div><div class=\"inlineWrapper\"><div  style = 'border-left: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace, Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 14px; '><span style=\"white-space: pre\"><span >SK.ValueLabelFormat = @(X) [<\/span><span style=\"color: rgb(167, 9, 245);\">'sample number = '<\/span><span >,num2str(X)];<\/span><\/span><\/div><\/div><div class=\"inlineWrapper\"><div  style = 'border-left: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace, Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 14px; '><span style=\"white-space: pre\"><span >SK.ColorList = [ 36, 59, 90; 199, 49, 68; 161,137,111; <\/span><\/span><\/div><\/div><div class=\"inlineWrapper\"><div  style = 'border-left: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace, Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 14px; '><span style=\"white-space: pre\"><span >                 73, 84,114; 209, 90,105; 226,209,191;<\/span><\/span><\/div><\/div><div class=\"inlineWrapper\"><div  style = 'border-left: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace, Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 14px; '><span style=\"white-space: pre\"><span >                 30, 30, 30;  30, 30, 30;  30, 30, 30].\/255;<\/span><\/span><\/div><\/div><div class=\"inlineWrapper\"><div  style = 'border-left: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace, Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 14px; '><span style=\"white-space: pre\"><span >SK.Align = <\/span><span style=\"color: rgb(167, 9, 245);\">'down'<\/span><span >;<\/span><\/span><\/div><\/div><div class=\"inlineWrapper\"><div  style = 'border-left: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace, Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 14px; '><span style=\"white-space: pre\"><span >SK.draw()<\/span><\/span><\/div><\/div><div class=\"inlineWrapper\"><div  style = 'border-left: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace, Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 14px; '><span style=\"white-space: pre\"><span >SK.setLabelLocation(3, <\/span><span style=\"color: rgb(167, 9, 245);\">'right'<\/span><span >)<\/span><\/span><\/div><\/div><div class=\"inlineWrapper\"><div  style = 'border-left: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace, Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 14px; '><span style=\"white-space: pre\"><span >SK.setLink(1:15, <\/span><span style=\"color: rgb(167, 9, 245);\">'FaceAlpha'<\/span><span >,.5)<\/span><\/span><\/div><\/div><div class=\"inlineWrapper\"><div  style = 'border-left: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace, Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 14px; '>&nbsp;<\/div><\/div><div class=\"inlineWrapper\"><div  style = 'border-left: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-top: 0px none rgb(33, 33, 33); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace, Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 14px; '><span style=\"white-space: pre\"><span style=\"color: rgb(0, 128, 19);\">% Rotate the entire diagram to vertical orientation <\/span><\/span><\/div><\/div><div class=\"inlineWrapper outputs\"><div  style = 'border-left: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-top: 0px none rgb(33, 33, 33); border-bottom: 1px solid rgb(217, 217, 217); border-radius: 0px; padding: 0px 45px 4px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace, Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 14px; '><span style=\"white-space: pre\"><span >rotateSankey(SK)<\/span><\/span><\/div><div  style = 'color: rgb(33, 33, 33); padding: 10px 0px 6px 17px; background: rgb(255, 255, 255) none repeat scroll 0% 0% \/ auto padding-box border-box; font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace; font-size: 14px; overflow-x: hidden; line-height: 17.234px; '><div class=\"inlineElement eoOutputWrapper disableDefaultGestureHandling embeddedOutputsFigure\" uid=\"7A9F8125\" prevent-scroll=\"true\" data-testid=\"output_1\" style=\"width: 1289.33px;\" tabindex=\"-1\"><div class=\"outputLayer selectedOutputDecorationLayer doNotExport\" aria-hidden=\"true\"><\/div><div class=\"outputLayer scrollableOutputDecorationLayer doNotExport\" aria-hidden=\"true\"><\/div><div class=\"outputLayer navigationFocusLayer doNotExport\" aria-hidden=\"false\" role=\"application\" tabindex=\"-1\"><\/div><div class=\"outputLayer activeOutputDecorationLayer doNotExport\" aria-hidden=\"false\" role=\"application\"><\/div><div class=\"figureElement eoOutputContent\" role=\"article\" aria-roledescription=\"Use Browse Mode to explore \" aria-description=\"figure output \"><img decoding=\"async\" class=\"figureImage figureContainingNode\" src=\"https:\/\/blogs.mathworks.com\/pick\/files\/POTWSankey_2.png\" style=\"width: 795px;\"><\/div><\/div><\/div><\/div><\/div><div  style = 'margin: 10px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre; color: rgb(33, 33, 33); font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; '><span class=\"_richTextNode\">The package has been downloaded thousands of times and slandarer has been very responsive to user requests in the discussions and review sections of the file exchange entry leading to several new versions since it's first release in 2023.<\/span><\/div>\r\n<\/div><script type=\"text\/javascript\">var css = '._richTextNode {white-space: break-spaces;}'; var head = document.head || document.getElementsByTagName('head')[0], style = document.createElement('style'); head.appendChild(style); style.type = 'text\/css'; if (style.styleSheet){ style.styleSheet.cssText = css; } else { style.appendChild(document.createTextNode(css)); }<\/script>","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img src=\"https:\/\/blogs.mathworks.com\/pick\/files\/POTWSankey_1.png\" class=\"img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" decoding=\"async\" loading=\"lazy\" \/><\/div><p>Mike's pick this week is sankey plot by Zhaoxu Liu \/ slandarer nominated by Yair Altman. Sankey diagrams visualize flows, of energy, money, materials, people, anything that moves from one place to... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2026\/07\/09\/sankey-diagrams-in-matlab\/\">read more >><\/a><\/p>","protected":false},"author":176,"featured_media":17363,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[40,16],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/17366"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/users\/176"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=17366"}],"version-history":[{"count":1,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/17366\/revisions"}],"predecessor-version":[{"id":17367,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/17366\/revisions\/17367"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media\/17363"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=17366"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=17366"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=17366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}