> From: Matthew Brand
>
> Thanks. Option A works (and is all I need), but option does not work.
>
> NB. Option A had syntax error Out instead of out, but works.
> NB. Option B did not work.
>
> load 'plot'
>
> 'output pdf "/tmp/capital/test space.pdf"' plot i.10
> NB. fails with pop-up window:
> NB.Unable to write file: /tmp/capital/test space.pdf
> NB.The file name is invalid.
Yes there was a problem with qchop. The following with slightly adjusted qchop
should work:
pd_show_jzplot_=: 3 : 0
ndx=. ({."1 PCmd) i. <'output'
if. ndx < #PCmd do.
OUTPUT=: 1 pick ndx{PCmd
end.
out=. dlb OUTPUT
fn=. 'pd_', tolower ' ' taketo out
arg=. ' ' takeafter out
fn~arg
EMPTY
)
qchop_jzplot_=: 3 : 0
q=. dquoted y
s=. ' '=y
qs=. q*.s
y=. DEL (inxb qs)}y
d...@unquot each ((DEL,' ')&charsub)@deb each chop y
)
This works for me now:
('output pdf "','"',~jpath '~temp/Capital/test space.pdf') plot i.10
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm