Re: Contouring high resolution complicated fields

From: David Ian Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Thu, 17 Feb 2005 12:25:45 -0700

Ray, Ivan,
Expanding a bit on this subject:

Actually, although 'cnRasterModeOn' still works, this resource is
deprecated in favor of
'cnFillMode', which has 3 possible values, "AreaFill" (the default),
"RasterFill" (equivalent to
setting 'cnRasterModeOn' to True) and "CellFill", a recently
implemented technique that draws
filled polygons for each grid cell. See

http://ngwww.ucar.edu/ngdoc/ng/ref/hlu/obj/
ContourPlot.res.html#cnFillMode

for more details.

The "RasterFill" mode has associated resources that allow you to down
sample the plot if you
want smaller output files and/or faster performance.

The relative plotting speed of each of these techniques is dependent on
a number of factors, including
plot complexity, whether the data is overlaid through a map projection,
the dimensionality of the
coordinate data, and for 2D coordinates, which grid transformation you
use (see
http://ngwww.ucar.edu/ngdoc/ng/ref/hlu/obj/
Transformation.res.html#trGridType). We are planning
to develop some more explicit guidelines to help choose the best
options for various general plot
categories.

In the case you describe, Ray, where you are not drawing into a map
projection and the coordinates
are 1D (I assume) or you are just using indexed arrays, Ivan is almost
certainly correct that the
"RasterFill" mode will be faster.
  -dave

On Feb 17, 2005, at 7:09 AM, Ivan Lima wrote:

> You can try setting cnRasterModeOn = True. It will be a lot
> faster but it will produce a bigger output file.
>
> - Ivan
>
> On Wed, Feb 16, 2005, R. T. Pierrehumbert wrote:
>
>> I routinely need to do 2D shaded maps of tracer fields (like water
>> vapor) which
>> have a lot of fine-scale structure. If I do an ngl.contour(...)
>> (color
>> fill on) of
>> a 120x400 field which is spatially simple, it's no problem. However,
>> if the field has a lot of fine scale structure -- thin filaments, what
>> have you, --
>> it takes so long that it's unusable. I think this is probably because
>> ngl/ncl
>> generates a polygon for each region to be filled, and the perimeters
>> can get exponentially large in cases like I'm doing.
>>
>> Is there any way to do a fast color-shaded map of a high resolution
>> complicated field? I don't need contour lines.Color fill by itself
>> is good enough.
>>
>> The same field plots fine in Matlab (contourf) or in vcs, so I imagine
>> these packages are using a different algorithm to generate the map.
>>
>> --Ray
>>
>> _______________________________________________
>> pyngl-talk mailing list
>> pyngl-talk_at_ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
>>
> _______________________________________________
> pyngl-talk mailing list
> pyngl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/pyngl-talk

_______________________________________________
pyngl-talk mailing list
pyngl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Thu Feb 17 2005 - 12:25:45 MST

This archive was generated by hypermail 2.2.0 : Thu Jan 19 2006 - 21:31:52 MST