Re: Colored ListDensityPlot

• To: mathgroup at smc.vnet.net
• Subject: [mg9264] Re: Colored ListDensityPlot
• From: anrecht at t-online.de (Joerg Anrecht)
• Date: Fri, 24 Oct 1997 01:01:20 -0400
• Organization: T-Online
• Sender: owner-wri-mathgroup at wolfram.com

```On 20 Oct 1997 22:12:53 -0400, "David Keith" <dkeith at teleport.com>
wrote:

>I am trying to manipulate image data which is described as pixel
>intensity data, with the intensities of various colors in separate
>files. It is easy to read the data in, reformatting it as an array, and
>display a black and white image of any given color using
>ListDensityPlot.
>
>What I would like to do is to plot it as a false color (or even true
>color) image using something like ListDensityPlot. Ideally I could
>describe the image as an array of vectors {R,G,B} and then plot the
>result as a color image.
>
>I would be grateful for any suggestions, or even a package, for doing
>this.
>
>Thanks.
>
>
Hi David

try this:

(* a matrix with rgb-pixels in the range [0,1] *)

pic =  {
{{0,0,0},{1,0,0}},
{{0.2,0.2,0.2},{0,1,0}},
{{0.4,0.4,0.4},{0,0,1}},
{{0.6,0.6,0.6},{1,1,0}},
{{0.8,0.8,0.8},{0,1,1}},
{{1,1,1},{1,0,1}}
};

(* apply RGBColor to all pixels *}

r=Apply[RGBColor,pic,{2}];

(* and show the graphic *)

RasterArray[r]//Graphics//Show

(* please notice, that the first line in pic is the bottom line in the
graphic *)

Joerg Anrecht

```

• Prev by Date: RE: Q: residual standard deviation
• Next by Date: Re: Q: About constants inside Distribute
• Previous by thread: Re: Colored ListDensityPlot
• Next by thread: Possible problem with dimensions in matrix products