MathGroup Archive 2004

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

Search the Archive

Re: how to convert a matrix to a graphy

  • To: mathgroup at smc.vnet.net
  • Subject: [mg49190] Re: how to convert a matrix to a graphy
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 7 Jul 2004 01:42:23 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <ccdm0b$seq$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

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