Thank you, Isaiah.
Then I understand what I want is the "lazymode" feature, so if I do
using Requires
@lazymod Gadfly
then Gadfly will not be loaded until the first time it is needed.
However, for "Requires" to know when it is needed, do I need to qualify
with prefix "Gadfly." all my calls to Gadfly functions? I.e. write my code
above as:
function fwhm(xk, yk; dodraw::Bool=false)
# ...
if dodraw
Gadfly.plot(x=xk, y=yk)
Gadfly.plot(x=x1,y=y1)
Gadfly.plot(x=x2,y=y2) # etc.
end
# ...
end
Thank you again.