MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: rasterarray border?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg56037] Re: rasterarray border?
  • From: dh <dh at metrohm.ch>
  • Date: Thu, 14 Apr 2005 08:54:30 -0400 (EDT)
  • References: <d3ia99$9jj$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Mauel,
I do not think that you can draw the border inside RasterArray, You must 
draw it separately, like e.g.:


von = Table[Random[Integer, {-1, 2}], {3}, {3}];

Show[Graphics[{
             RasterArray[von /.
             {-1 -> RGBColor[1, 1, 1],
               0 -> RGBColor[0.97, 0.97, 1],
               1 -> RGBColor[0.3, 0, 0],
               2 -> RGBColor[1, .78, .78]}],
             (Line[t = Reverse[#];
             {t - {0, 0}, t - {1,0}, t - {1, 1},
             t- {0, 1},t - {0, 0}}]) & /@
             Position[von, x_ /; x != -1]}],
       AspectRatio -> Automatic];

Sincerely, Daniel

Manuel Marques-Pita wrote:
> hello,
> 
> I am drawing a rasterarray in which I need to draw a border/stroke round 
> some of the elements in the array (all the ones != -1 below).
> 
> Show[Graphics[RasterArray[von /.
>            {-1 -> RGBColor[1, 1, 1],
>              0 -> RGBColor[0.97, 0.97, 1],
>              1 -> RGBColor[0.3, 0, 0],
>              2 -> RGBColor[1, .78, .78]}]],
>      AspectRatio -> Automatic];
> 
> I haven't found a way to do this yet, any ideas/suggestions?
> 
> Thanks in advance!
> 
> Manuel
> 


  • Prev by Date: Re: rasterarray border?
  • Next by Date: Re: Problem with evaluation of Besel Functions
  • Previous by thread: Re: rasterarray border?
  • Next by thread: Re: rasterarray border?