MathGroup Archive 2004

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

Search the Archive

Re: how to convert a matrix to a graphy


Hi,

matrix = Table[Random[Integer, {-127, 128}], {8}, {8}]

bitmap = Graphics[Raster[matrix, {{0, 0}, Reverse[Dimensions[matrix]]},
      {Min[#], Max[#]} &[Flatten[matrix]], ColorFunction -> GrayLevel], 
    AspectRatio -> Automatic]

Regards
  Jens


Justin wrote:
> 
> The matrix A is a 8*8 one. The largest gray level is a_max and the
> smallest is -a_max.
> 
> I wanna convert this matrix to a graphy. How to do?
> 
> Thanks a lot
> 
> JC


  • Prev by Date: Questions about Graph output
  • Next by Date: No More Memory Available??
  • Previous by thread: how to convert a matrix to a graphy
  • Next by thread: Re: how to convert a matrix to a graphy