RE: listdensityplot, black box?
- To: mathgroup at smc.vnet.net
- Subject: [mg74853] RE: [mg74828] listdensityplot, black box?
- From: "David Annetts" <davidannetts at aapt.net.au>
- Date: Sun, 8 Apr 2007 05:06:50 -0400 (EDT)
- References: <200704070801.EAA21593@smc.vnet.net>
Hi Alessandro,
> I have a rectangular grid of data (249x400) in the simple
> form of values 0/1, e.g:
> {{1, 1, 0, ......, 1, 1, 1, 0, 0, 0, 0}, ... } I read them with
>
> - lab=Import["...image.pbm"]
>
> - lab2 = lab[[1, 1]]
>
> and Show[Graphics[Raster[lab2]]] shows the image OK.
>
> Now, whenever I do:
>
> - ListDensityPlot[lab2]
>
> I get no errors, but a completely black plot - of the correct
> size 249x400, however.
>
> I played a little with ColorFunction and ColorOutput, but it
> didnt help.
>
> Do you have any idea what I'm doing wrong???
It's actually working fine, you just need to turn the mesh, which by default
is on, off.
dat = Random[Integer, {0, 1}] & /@ Range[249 * 400];
dat = Partition[dat, 249];
ListDensityPlot[dat, AspectRatio -> (249/400), Mesh -> False];
Regards,
Dave.
- References:
- listdensityplot, black box?
- From: "alexxx.magni@gmail.com" <alexxx.magni@gmail.com>
- listdensityplot, black box?