[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: surface regression
From: |
Kai Habel |
Subject: |
Re: surface regression |
Date: |
Wed, 27 Feb 2008 22:44:11 +0100 |
User-agent: |
Thunderbird 2.0.0.9 (X11/20070801) |
Kai Habel schrieb:
> Ben Abbott schrieb:
>
>> On Wednesday, February 27, 2008, at 02:37PM, "Ben Abbott" <address@hidden>
>> wrote:
>>
>>
>>> On Wednesday, February 27, 2008, at 02:11PM, "Kai Habel" <address@hidden>
>>> wrote:
>>>
>>>
>>>> Hello all,
>>>>
>>>> I see the problem below with a very recent "hg pull -u " and version 3.0.0.
>>>>
>>>> The following sequence
>>>>
>>>> s = surf(rand(3));
>>>> set(s,'FaceColor','none')
>>>>
>>>> should draw a black mesh only, but instead I see a colored surface
>>>> without mesh. Can someone confirm this? I am sure it had worked once,
>>>> didn't it?
>>>>
>>>> Kai
>>>>
>>>>
>>> I see the same behavior, but don't know if it worked correctly before.
>>>
>>> Ben
>>>
>>>
>> I noticed that the colors are different for set(s,'FaceColor','flat')
>>
>> Ben
>>
>>
>>
> Yes I noticed this as well. Interestingly
>
> octave:10> s=surf(peaks);
> octave:11> set(s,'FaceColor','none')
> octave:12> set(s,'EdgeColor','flat')
>
> draws a colored mesh as expected... further investigating.
>
> Kai
> _______________________________________________
> Bug-octave mailing list
> address@hidden
> https://www.cae.wisc.edu/mailman/listinfo/bug-octave
>
>
Moving it to the maintainers list.
Hello,
basically two changes were required to make this work, again(?).
First, I had to "unset pm3d" in the case when facecolor is "none".
Second in those cases the linecolor must be set along the edgecolor
value, either 'flat' or [r g b].
Since this is my first changeset, I hope everything is correct with it.
Kai
# HG changeset patch
# User address@hidden
# Date 1204148183 -3600
# Node ID f478e6b669da452b1dd472795791e26fc8eceb7c
# Parent a2950622f070e8ff747fca0a2fe6685cda9fdb11
If FaceColor is none don't use pm3d mode and set linestyle correctly.
diff -r a2950622f070 -r f478e6b669da scripts/plot/__go_draw_axes__.m
--- a/scripts/plot/__go_draw_axes__.m Wed Feb 27 04:33:39 2008 -0500
+++ b/scripts/plot/__go_draw_axes__.m Wed Feb 27 22:36:23 2008 +0100
@@ -923,9 +923,48 @@ function __go_draw_axes__ (h, plot_strea
hidden_removal = true;
endif
endif
-
+
if (flat_interp_edge && facecolor_none_or_white)
withclause{data_idx} = "with line palette";
+ fputs (plot_stream, "unset pm3d\n");
+ elseif (facecolor_none_or_white)
+ edgecol = obj.edgecolor;
+ if (have_newer_gnuplot)
+ if (mono)
+ colorspec = "";
+ else
+ colorspec = sprintf ("linecolor rgb \"#%02x%02x%02x\"",
+ round (255*edgecol));
+ endif
+ fprintf (plot_stream,
+ "set style line %d %s lw %f;\n",
+ data_idx, colorspec, obj.linewidth);
+ else
+ if (isequal (edgecol, [0,0,0]))
+ typ = -1;
+ elseif (isequal (edgecol, [1,0,0]))
+ typ = 1;
+ elseif (isequal (edgecol, [0,1,0]))
+ typ = 2;
+ elseif (isequal (edgecol, [0,0,1]))
+ typ = 3;
+ elseif (isequal (edgecol, [1,0,1]))
+ typ = 4;
+ elseif (isequal (edgecol, [0,1,1]))
+ typ = 5;
+ elseif (isequal (edgecol, [1,1,1]))
+ typ = -1;
+ elseif (isequal (edgecol, [1,1,0]))
+ typ = 7;
+ else
+ typ = -1;
+ endif
+ fprintf (plot_stream,
+ "set style line %d lt %d lw %f;\n",
+ data_idx, typ, obj.linewidth);
+ endif
+ withclause{data_idx} = sprintf("with line linestyle %d",
data_idx);
+ fputs (plot_stream, "unset pm3d\n")
endif
if (have_newer_gnuplot)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: surface regression,
Kai Habel <=