On Thursday, October 9, 2008 at 12:04:56 (-0700) Alan W. Irwin writes: > ... > Note, the question of PLplot support for gradients has internal core library > implications (e.g., triangle representation for surfaces), API implications > (what is the most convenient way to let PLplot users specify gradients?),
That's what cmap1 was created for. In its simplest application, only two points must be specified to map functional value to color space value. The color at intermediate points is determined by interpolation. Arbitrarily many "control points" can be added to achieve a great variety of effects. If there is a "jaggedness" to the final plot, I would look at: - number of shade levels chosen by plot driver (e.g. plshades) - number of cmap1 color entries chosen to allocate by device driver as the culprit. The underlying cmap1 model is independent of these. Note, there are some good reasons to increase the number of cmap1 color entries in both the shade plot call or the device driver: to get the very smooth color gradient you describe, and to better take advantage of today's hardware capabilities. There are also some downsides: plshade becomes quite slow with high resolution plots and lots of colors due to all the triangles being filled, and nowadays lots of people are running VPN'ed Xwindows apps at great distance, where use of a large color space definitely impacts responsiveness. Ideally in the latter case, you could choose the number of colors for the driver to allocate through a resource setting or runtime flag. As you mention, utilizing hardware gradient support in the driver is an intriguing possibility, but there is the SW fallback issue. One could go with rasters instead of the plshade approach, but in this case you have to deal with scaling issues (redrawing plot at different size/shape, zooms). I never thought the headache in that case was worth it once plshade was available. -- Maurice LeBrun ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel