Re: Flat colour in RegionPlot; millions of little triangles
- To: mathgroup at smc.vnet.net
- Subject: [mg81632] Re: Flat colour in RegionPlot; millions of little triangles
- From: Antti Penttilä@smc.vnet.net
- Date: Sun, 30 Sep 2007 03:55:17 -0400 (EDT)
- Organization: University of Helsinki
- References: <fdkqst$7bk$1@smc.vnet.net> <fdl96l$cup$1@smc.vnet.net>
Hi,
The PDF in the link from Jean-Marc has some white lines between polygons
inside the regionplot. In EPS they are even more visible. I have noticed
the same problem in one plot of mine which was intended to a scientific
publication. The exported EPS plot was terrible because there was a very
dense grid of polygons clearly visible in the plot. I think that this
should be corrected by Wolfram.
Regards,
Antti
Jean-Marc Gulliet wrote:
> Will Robertson wrote:
>
>> I'm creating a bunch RegionPlot figures at the moment and I'm a little
>> concerned by the algorithm Mathematica uses to save the figure.
>> Consider something like this, adapted from the RegionPlot help:
>>
>> RegionPlot[
>> Abs[Nest[(#^2 + x + I y) &, x + I y, 16]] < 2, {x, -2, 1}, {y, -1.5,
>> 1.5}]
>> Export["region-plot.svg", %];
>>
>> (I've chosen SVG just so I can open the image in Inkscape. The effect
>> is visible in EPS and PDF images as well.)
>>
>> The resulting image is a funny shape that consists of millions (I
>> exaggerate) of polygons that fill the region, obviously corresponding
>> to the mesh used in Mathematica to create the region. However, it also
>> creates a grey outline that is a *single* graphic object that is
>> otherwise transparent.
>>
>> In Inkscape, I can delete *all* of the polygons and apply a fill
>> colour to the single graphic object that defines the outline. This
>> reduces the complexity and file size of the image by orders of
>> magnitude with the same (or better!) output quality.
>
> <snip>
>
> Could you be more precise about the size of the exported files (before
> and after manual fixing) and about what size you expect and deem as
> reasonable? I am asking because when I tried the following code on my
> system (Windows XP SP2, Mathematica 6.0.1), the exported file (in PDF
> format since I do not have Inkscape) is about 40 KB, size that does not
> look that huge. However, it is possible that the resulting file size is
> dependent of the platform used (Windows, Linux, Mao).
>
> In[1]:= RegionPlot[
> Abs[Nest[(#^2 + x + I y) &, x + I y, 16]] < 2, {x, -2, 1}, {y, -1.5,
> 1.5}]
> Export["region-plot.pdf", %];
>
> [... graphic deleted ... file is about 40 KB]
>
> In[3]:= $Version
>
> Out[3]= "6.0 for Microsoft Windows (32-bit) (June 19, 2007)"
>
> You can get the file at
>
> http://homepages.nyu.edu/~jmg336/mathematica/region-plot.pdf
>
> Regards,