[Matplotlib-devel] article on scales
Nicolas P. Rougier
Nicolas.Rougier at inria.fr
Sat Jan 2 06:06:05 EST 2016
I’ve started some experiments at: https://github.com/rougier/pyd3
I’ve only implemented linear scales (pyd3.scale) so far, but it is a good start at showing what can be done because it also requires the d3-interpolate functions (pyd3.interpolate). Almost all (translated) D3 tests pass.
For example, you can write:
>>> from pyd3 import interpolate
>>> i = interpolate.value( {"bg": "red"}, {"bg": "green”} )
>>> print(i(.5)
>>> {"bg": "#804000”}
Also, I’ve used linear/power/log scales in glumpy and they are pretty useful (but implementation is only for the GPU).
Nicolas
> On 29 Dec 2015, at 00:10, Brian Granger <ellisonbg at gmail.com> wrote:
>
> Nice, I would really like to see a nice python scale library that was
> independent of any particular viz package that everyone could start to
> use...
>
> On Mon, Dec 28, 2015 at 11:17 AM, Thomas Caswell <tcaswell at gmail.com> wrote:
>> There has been some discussion about how to generalize/unify the mixture of
>> scaling functionality in mpl (axes scales, color.norm, and the units
>> framework). Mike Bostock has pulled the scale functionality out of d3 [1],
>> we might want to take a look at that for API inspiration (also scroll to the
>> bottom of the post and note what color maps he uses as demo :) ).
>>
>> Tom
>>
>> [1] https://medium.com/@mbostock/introducing-d3-scale-61980c51545f
>>
>> _______________________________________________
>> Matplotlib-devel mailing list
>> Matplotlib-devel at python.org
>> https://mail.python.org/mailman/listinfo/matplotlib-devel
>>
>
>
>
> --
> Brian E. Granger
> Associate Professor of Physics and Data Science
> Cal Poly State University, San Luis Obispo
> @ellisonbg on Twitter and GitHub
> bgranger at calpoly.edu and ellisonbg at gmail.com
> _______________________________________________
> Matplotlib-devel mailing list
> Matplotlib-devel at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-devel
More information about the Matplotlib-devel
mailing list