|
From: Daniel J S. <dan...@ie...> - 2010-09-21 16:26:50
|
Something certainly doesn't look right with the original. However, putting the resolution so high doesn't seem like the best solution. At the same time, limiting to 128 steps seems restrictive. I would think it all depends on how the user sets up the color axis. For example, if only five colors are used, perhaps only five levels are needed, so long as the color ticks align with the color box representation.
Dan
Manfred Schwarb wrote:
> Hi,
>
> when doing 2d plots ("splot") with discrete colors
> [i.e. 'set palette defined ( 0 "yellow", 0.5 "yellow", 0.5 "red", 1 "red" )'],
> I get some distorted color distribution in the color box.
>
> I then discovered that the reason is the coarse stepping
> in calculating the color values.
> The following cures it for me:
>
> --- color.c.orig 2010-09-21 14:09:41.000000000 +0200
> +++ color.c 2010-09-21 14:09:48.000000000 +0200
> @@ -361,7 +361,7 @@
> static void
> draw_inside_color_smooth_box_bitmap(FILE * out)
> {
> - int steps = 128; /* I think that nobody can distinguish more colours drawn in the palette */
> + int steps = 12800; /* I think that nobody can distinguish more colours drawn in the palette */
> int i, xy, xy2, xy_from, xy_to;
> double xy_step, gray;
> gpiPoint corners[4];
>
>
> I figured that "steps" has to be in the range of 10000 to get
> completely accurate color value calculation.
>
> Good and bad examples as attachments.
>
>
> Cheers,
> Manfred
>
>
> ------------------------------------------------------------------------
>
>
> ------------------------------------------------------------------------
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> gnuplot-beta mailing list
> gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
--
Dan Sebald
email: daniel(DOT)sebald(AT)ieee(DOT)org
URL: http://www(DOT)dansebald(DOT)com
|