Non linear colormap

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Non linear colormap

Barth
Dear all,

Is there a way with chaco plot to have a colormap which is not a linear function: from what i understand, the link between the z-value of an image_plot and the RGB values of the image is linear. Is there a built-in way to make this dependence non-linear (for example a log-scale, or a power law), or should i make my own new color_mapper class ? 

Bests,

Pierre 

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Non linear colormap

Robert Kern
On Thu, Jul 12, 2012 at 4:08 PM, Pierre Barthelemy <[hidden email]> wrote:
> Dear all,
>
> Is there a way with chaco plot to have a colormap which is not a linear
> function: from what i understand, the link between the z-value of an
> image_plot and the RGB values of the image is linear. Is there a built-in
> way to make this dependence non-linear (for example a log-scale, or a power
> law), or should i make my own new color_mapper class ?

https://github.com/enthought/chaco/blob/master/examples/demo/nonlinear_color_mapping.py

--
Robert Kern
Enthought
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Non linear colormap

Barth
Thanks a lot !!! 

On Thu, Jul 12, 2012 at 5:10 PM, Robert Kern <[hidden email]> wrote:
On Thu, Jul 12, 2012 at 4:08 PM, Pierre Barthelemy <[hidden email]> wrote:
> Dear all,
>
> Is there a way with chaco plot to have a colormap which is not a linear
> function: from what i understand, the link between the z-value of an
> image_plot and the RGB values of the image is linear. Is there a built-in
> way to make this dependence non-linear (for example a log-scale, or a power
> law), or should i make my own new color_mapper class ?

https://github.com/enthought/chaco/blob/master/examples/demo/nonlinear_color_mapping.py

--
Robert Kern
Enthought
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev