shift in the data around it that you'd like to be able to minimize.

So just by centering the vertical stack of data around the horizontal axis

minimizes the heighth of the chart around

that horizontal axis and it also minimizes the slope at the top and the bottom.

There's a Streamgraph layout that does an even better job of this and

it does this just by changing where the position g0 is.

Streamgraph sets g0 equal to the result of this formula.

So you just evaluate this formula based on your data values f i,

and we won't go through the derivation of this formula.

But by just changing where the base of this stacked bar chart or

stacked line chart occurs and then stacking based to that new baseline,

we get an even smoother appearance and it makes it even easier for

us to make comparisons as we move horizontally across this chart,

to determine relative changes to each of these dependent variables.

It minimizes the deviation and the wiggle, the deviation being how far

a variable's plot moves from its previous position on the horizontal axis,

and the wiggle is minimizing the slope, basically the sheer effect

that you get from the wiggle.

You can also improve the appearance by changing the order in which you

add variables.

So, if variables are zero until a certain position on the horizontal axis,

and then they change from zero to some value,

you can change where they appear in the stack of variables.

And so in this case, they're just stacked in some fixed ordering,

some arbitrary ordering.

And you can see kind of a stream in the coloring.

Coloring each variable differently helps perceive that stream.