I realized the bug was reported about a year ago in the forum.
http://www.jsoftware.com/pipermail/general/2008-May/031918.html

I also added some remarks on the issue in the wiki.
http://www.jsoftware.com/jwiki/System/Library/Bugs#Plotbugs

On Tue, Apr 28, 2009 at 3:43 PM, June Kim <[email protected]> wrote:
> The minimal bug case, so far I found, is:
>
> load'plot'
> pd'penstyle 1'
> pd 0 1
> pd 'show'
>
> I tracked down the problem and figured out its source:
>
>   (<12 6)linepattern_jzplot_ 10 10 40 40
>  0  0 10 10
> 22 22 28 28
> 40 40  0  0
>   (<12 6)linepattern_jzplot_ 10 10 25 25 40 40
> 10 10 20 20
> 25 25 40 40
>
> As you see when there are three points, it works okay, but when there
> are two points, you get garbage 0 0 at the starting point and the
> ending point.
>
> It is because of erroneous use of append(,) in linepattern.
>
> If you change the linepattern code in jzplot.ijs as following:
>
> linepattern=: 4 : 0
>    nap=. ,`...@.('' -: ])`...@.('' -: [)  NB. null appendable without effect
>    x=. > x
>    y=. _2 [\ y
>    if. x -: 1 0 do.
>      <. 2 ,\ y
>    else.
>      a=. ; 2 < @ (x&linepattern1) \ }: y
>      <. _2 ,\ a nap x linepattern2 _2 {. y  NB. changed the simple
> append into nap
>    end.
> )
>
> It works without any problem:
>
>   (<12 6)linepattern_jzplot_ 10 10 40 40
> 10 10 22 22
> 28 28 40 40
>
> Of course, the graph draws perfectly with this modification.
>
> If there are cleaner modification, of which existence I am sure, I'd
> be happy to hear. Also I wish this bug is removed in the later
> release.
>
> Thank you.
>
> On Tue, Apr 21, 2009 at 11:15 PM, June Kim <[email protected]> wrote:
>> I suppose your post meant to be a reply to my another recent posting
>> "Bug in penstyle?".
>>
>> Strangely, the following modification works, as you revealed.
>>
>>     pd 'reset'
>>     pd 'penstyle 1'
>>     pd 0 500 1000;0 500 1000
>>     pd 'show'
>>
>> I think I had found a bug case with two points(say, 0 1;0 1) with penstyle 1.
>>
>> On Tue, Apr 21, 2009 at 8:48 PM, Brian Schott <[email protected]> wrote:
>>> I got a slightly better result by plotting this slightly more complicated 
>>> graph.
>>>
>>>     pd 'reset'
>>>     pd 'penstyle 1'
>>>     pd 0 500 1000;0 250 1000
>>>     pd 'show'
>>>
>>>
>>>
>>> --
>>> (B=) <-----my sig
>>> Brian Schott
>>> ----------------------------------------------------------------------
>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>>
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to