N. Drinkwater wrote:
There is a minor problem printing pdf files generated by plot in J 6.01 from Acrobat 7 or 8. The files may contain numbers in exponential notation, e.g., 1.2345e-6, which is not allowed by the pdf file spec. When trying to print a pdf containing such a number from Acrobat, a blank page results (and the plot is wiped out in the print preview in the acrobat print dialog). Foxit PDFReader ignores the problem and prints fine.

A simple, if inelegant, workaround is to change the pfmt function in jzplot to:

pfmt_jzplot_=: 3 : 0
dat=. ": (-.0=y)*0.0001 >. y
txt=. ,dat
($dat) $ '-' (I. txt='_') } txt
)

Thanks, this solution seems fine.

For pfmt, I suggest two minor changes. As far as I am aware, PDF supports negative numbers, so the test should be on magnitude. Also, I am inclined to set small values to 0, rather than 0.0001; as you say, these don't show up anyway. So the first line of pfmt becomes:

dat=. ": y * 0.0001 <: |y

I'll make these changes in the next beta.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to