The coinsert statement puts the jzplot in the search path of the locale you use
it in (pzplot in this case).
copath 'pzplot'
+------+----+----+-+
|jzplot|jafm|jgl2|z|
+------+----+----+-+
That means if you invoke a word in pzplot and the word is not defined in pzplot
it will look to see if it is defined in the other locales further up the path.
However invoking a word from a locale further up the path of pzplot will not
search "downstream".
In this case when you invoke plot from the base locale, the plot verb is found
in the z locale
copath 'base'
+-+
|z|
+-+
If you look at the definition of plot_z_ you will see that it is pretty much a
cover verb for plot_jwplot_
copath 'jwplot'
+------+----+----+-+
|jzplot|jafm|jgl2|z|
+------+----+----+-+
So most of the words are being invoked from the jwplot locale which will
however look in the jzplot locale for words it doesn't find in jwplot. The
pzplot locale isn't in the path however and so won't get searched.
If you haven't done the Locales lab yet (Studio|Labs|Locales), I'd recommend it.
> From: Thomas Costigliola
>
> Yes, EDGESIZE=0 produces the correct output so makedrawbar does not
> need to be modified.
>
> Thanks for the script, that was my idea but I didn't think I had to
> explicitly define the verbs in the jzplot locale by adding the
> _jzplot_ becuase of the coinsert statement. Why is this necessary?
>
> On Tue, Nov 10, 2009 at 8:19 PM, Sherlock, Ric wrote:
> >> From: Sherlock, Ric
> >>
> >> Some comments:
> >> Do you need to special case when edgecolor is _1 ? Could you just
> use
> >> an edgesize of 0 to get the same result? That simplifies your
> >> makedrawbar verb.
> >
> > Actually I see now that without that special case handling it is
> exactly the same as the existing makedrawbar_jzplot_ verb and could
> therefore be left out of the script altogether:
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm