3D patches (was: Graphic properties not working)

Ben Abbott bpabbott at mac.com
Tue Mar 24 18:45:04 CDT 2009


On Mar 24, 2009, at 12:39 PM, Ben Abbott wrote:

> On Tuesday, March 24, 2009, at 09:58AM, "John W. Eaton" <jwe at octave.org 
> > wrote:
>> On 24-Mar-2009, Ben Abbott wrote:
>>
>> | On Mar 24, 2009, at 3:29 AM, Marco Caliari wrote:
>> |
>> | > On Mon, 23 Mar 2009, Ben Abbott wrote:
>> | >
>> | >>
>> | >> On Monday, March 23, 2009, at 10:37AM, "Marco Caliari" <marco.caliari at univr.it
>> | >> > wrote:
>> | >>> Dear maintainers,
>> | >>>
>> | >>> I noticed that some (all?) graphic properties do not work  
>> anymore in
>> | >>> Octave 3.1.54
>> | >>>
>> | >>> octave:1> contourf(peaks,'EdgeColor','blue')
>> | >>> error: set: unknown property "EdgeColor"
>> | >>> error: called from:
>> | >>> error:   /usr/local/share/octave/3.1.54/m/plot/__contour__.m at
>> | >>> line 191, column 5
>> | >>> error:   /usr/local/share/octave/3.1.54/m/plot/contourf.m at  
>> line
>> | >>> 71, column 5
>> | >>>
>> | >>> I don't know if it is a bug or a syntax change.
>> | >>>
>> | >>> Best regards,
>> | >>>
>> | >>> Marco
>> | >>
>> | >> Using matlab, your example does work. However, Matlab's  
>> hggroup has
>> | >> no "EdgeColor" property. It appears that Matlab is setting the
>> | >> "LineColor" property when the "EdgeColor" property is specified.
>> | >>
>> | >> If you do that directly, you'll get what you desire.
>> | >>
>> | >> contourf (peaks, "linecolor", "blue")
>> | >
>> | > Thanks, it works. I suspected a regression since
>> | > contourf(peaks,'EdgeColor','blue') works in Octave 3.0.x and
>> | > surface(peaks,'EdgeColor','blue') works in Octave 3.1.54. Anyway,
>> | > now I have the following (always reproducibile)
>> | >
>> | > octave:1> surface(peaks,'EdgeColor','blue') # it works
>> | >
>> | > BUT
>> | >
>> | > octave:2> contourf(peaks,'EdgeColor','blue') # it does not  
>> work, as
>> | > expected
>> | > error: set: unknown property "EdgeColor"
>> | > error: called from:
>> | > error:   /usr/local/share/octave/3.1.54/m/plot/__contour__.m at  
>> line
>> | > 191, column 5
>> | > error:   /usr/local/share/octave/3.1.54/m/plot/contourf.m at line
>> | > 71, column 5
>> | > octave:2> surface(peaks,'EdgeColor','blue') # it does not work
>> | > anymore!!!
>> | > error: gnuplot (as of v4.2) only supports 2D filled patches
>> | > error: called from:
>> | > error:   /usr/local/share/octave/3.1.54/m/plot/ 
>> __go_draw_axes__.m at
>> | > line 543, column 4
>> | > error:   /usr/local/share/octave/3.1.54/m/plot/ 
>> __go_draw_figure__.m
>> | > at line 90, column 3
>> | > error:   /usr/local/share/octave/3.1.54/m/plot/ 
>> gnuplot_drawnow.m at
>> | > line 69, column 5
>> | >
>> | > That is, if you call surface(peaks,'EdgeColor','blue') after a
>> | > contourf(peaks,'EdgeColor','blue'), the former does not work  
>> anymore.
>> | >
>> | > Best regards,
>> | >
>> | > Marco
>> |
>> | I'm not sure this is a regression. There is no "EdgeColor" property
>> | for Matlab's hggroup, and my memory is that Octave's hggroup is a
>> | rather recent addition, and was not used in 3.0.3 (?).
>>
>> I think the point is that after the contourf failure, the call to
>> surface fails when it worked previously.  Why should that happen?
>> What state is set internally on the contourf failure that carries
>> over to the next call to surface and causes it to fail?
>>
>> jwe
>>
>
> This appears to result for a 3D view of 2D patches. Actually the  
> gnuplot "patch" is a filled curve, and may only be viewed in 2D.
>
> So the current fix is to either delete the filled contour, or to  
> delete the 3D surface.
>
> The preferred solution (I think) would be to implement patches using  
> the a 3D surface rather than the 2D filled curve.
>
> There was a closely related discussion on another thread, I've cc'd  
> Martin and David.
>
>    https://www-old.cae.wisc.edu/pipermail/octave-maintainers/2009-March/011289.html
>
> Should this be moved to the maintainers list?
>
> Ben

I've moved it to the maintainers list.

Ben




More information about the Octave-maintainers mailing list