Re: Exporting Density Plots -- one pixel per point?

• To: mathgroup at smc.vnet.net
• Subject: [mg64375] Re: [mg64344] Exporting Density Plots -- one pixel per point?
• From: "Yasvir A. Tesiram" <tesiramy at omrf.ouhsc.edu>
• Date: Tue, 14 Feb 2006 01:32:06 -0500 (EST)
• References: <200602130815.DAA12543@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Hi,

As a first suggestion I would say, work with off-screen graphics (i.e. set
option DisplayFunction -> Identity).

Here is one  example, on a Centrino 2.0GHz laptop, 1GB RAM, Mathematica
5.2, Linux kernel 2.6.

d = Partition[Table[i, {i, 3000*3000}], 3000];

In[8]:=
Length[d]

Out[8]=
3000

In[11]:=
fig=ListDensityPlot[d,Mesh -> False, DisplayFunction -> Identity,
PlotRange -> All];//Timing

Out[11]=
{0.000999 Second,Null}

(* I imagine that using custom colour functions for so many pixels will up
the time a great deal *)

In[13]:=
Export["example.tif",fig,"TIFF"];//Timing

Out[13]=
{12.6071 Second,Null}

The output looked OK to me on GIMP.

Good luck. Sounds like some pretty smick imaging to me.

Yas

> Hello,
>
> I wish to generate large bitmaps (tiffs, say) where each the greyscale
> color value of each pixel is determined by a given function of x and y.
> By large, I mean more than 9E6 pixels.
>
> I've tried using a density plot for this, and then a rasterized table,
> but I run into a couple of difficulties. First, if I use pixel counts
> which approach this order of magnitude, I get memory errors -- on a
> win32 machine with 2GB installed. Second, if I make do with a smaller
> pixel count, I have trouble exporting the plot in a truly
> one-pixel-per-data-point fashion. (The process is time consuming, and
> results are unconvincing).
>
> I think the problem is the way Mathematica internally tries do
> everything in a resolution independent way, which I don't want here.
>
> Ideas?
> Questions?
>
> (The specific application is to generate high resolution print-outs of
> holographic patterns which can later be imaged to photographic film.
> After appropriate development and bleaching, the exposed film can be
> used as a transmission hologram to couple gaussian laser beams into
> other interesting modes.)
>
> Thank you.
>

```

• Prev by Date: Re: Re: Comparison of Mathematica on Various Computers
• Next by Date: Re: Exporting Density Plots -- one pixel per point?
• Previous by thread: Exporting Density Plots -- one pixel per point?
• Next by thread: Re: Exporting Density Plots -- one pixel per point?