I’ve been doing some work with d3 recently. It’s certainly been an education… Out of the box, it supports several different types of interpolation between two points, which I’ve found quite useful. It allows me to focus on assembling my data, and not worry about transforming it to achieve the desired visual effect. For example, in trading markets, once a trade is seen at a certain price, X, it’s useful to think of that price holding until the next trade price seen at Y. With d3’s “step-after” interpolation, given two points, (t0, X) and (t1, Y), instead of drawing a single line between the two points, it draws a horizontal line between (t0, X) and (t1, X), then a vertical line between (t1, X) and (t1, Y).
I’ve don’t a bit of searching, but didn’t find anything obviously like this in matplotlib. Does it support such a feature?
Kinda sounds a bit like a barchart with the ‘step’ option, I think?
···
On Thu, Oct 30, 2014 at 12:16 PM, Skip Montanaro <skip@…789…> wrote:
I’ve been doing some work with d3 recently. It’s certainly been an education… Out of the box, it supports several different types of interpolation between two points, which I’ve found quite useful. It allows me to focus on assembling my data, and not worry about transforming it to achieve the desired visual effect. For example, in trading markets, once a trade is seen at a certain price, X, it’s useful to think of that price holding until the next trade price seen at Y. With d3’s “step-after” interpolation, given two points, (t0, X) and (t1, Y), instead of drawing a single line between the two points, it draws a horizontal line between (t0, X) and (t1, X), then a vertical line between (t1, X) and (t1, Y).
I’ve don’t a bit of searching, but didn’t find anything obviously like this in matplotlib. Does it support such a feature?
Kinda sounds a bit like a barchart with the 'step' option, I think?
On Thu, Oct 30, 2014 at 12:16 PM, Skip Montanaro <skip@...789...> wrote:
I've been doing some work with d3 recently. It's certainly been an education... Out of the box, it supports several different types of interpolation between two points, which I've found quite useful. It allows me to focus on assembling my data, and not worry about transforming it to achieve the desired visual effect. For example, in trading markets, once a trade is seen at a certain price, X, it's useful to think of that price holding until the next trade price seen at Y. With d3's "step-after" interpolation, given two points, (t0, X) and (t1, Y), instead of drawing a single line between the two points, it draws a horizontal line between (t0, X) and (t1, X), then a vertical line between (t1, X) and (t1, Y).
I've don't a bit of searching, but didn't find anything obviously like this in matplotlib. Does it support such a feature?
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net matplotlib-users List Signup and Options
Kinda sounds a bit like a barchart with the 'step' option, I think?
Almost, but not quite. I think of barcharts as displaying truly
discrete data, often with the dependent variable being a count of some
sort and the independent variable being a bucket. In my example, while
prices X and Y are constrained to be discrete by the nature of the
market (US stocks trade in one cent increments, for example), they are
connected in time, and there is no fixed "bucket" size (time
increment).
The only case I was not able to cover with this parameter are the
fill_between plots, because they do not use Line objects...
--
Pierre
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net matplotlib-users List Signup and Options