--- Hahn, Harvey wrote:
> Ric Sherlock wrote:
> I wrote earlier:
> |> ... How would you formulate the left argument to
> |> grid to display the smallest font size within the smallest cell
> size?
> |> I'd like to see how to fit the maximum amount possible of
> |> the P&F chart on the screen.
> |
> |You could try using the GRIDZOOM option as a start:
> |Compare
> | grid <"0 pfchart ''
> |to
> | (,:'GRIDZOOM';0.5) grid <"0 pfchart ''
>
> Actually, I had tried that exact command rather unsuccessfully before I
> wrote my request above. That command seemed to affect only two things:
> the font was slightly smaller, and 7 rows fit into the same space as 6
> rows without the argument added. It had no effect on the columns, and
> smaller values for GRIDZOOM in that command had no further effect
> whatsoever.
I also get no further effect from GRIDZOOM once the value is below 0.9. I
suspect the option is more useful for zooming in, rather than zooming out.
> I also tried multiple grid options (
> ;:'NAME1';value1;'NAME2';value2;... ) with no additional effect. So my
> question still stands: how to formulate a left argument that makes the
> grid as small as possible?
Not sure if the above is a typo, but in case it is not - the left argument to
the grid verb should be a boxed 2-column matrix/table (if it is not a 2-column
matrix, then the verb expects the left argument to be header labels for the
header rows and columns). The first column should contain the option name, the
2nd column the option value.
(,:'NAME1';value1 ) grid data
(('NAME1';value1),('NAME2';value2),:'NAME3';value3 ) grid data
Without changing the font (size) the best result I could get was as follows:
(('GRIDMARGIN';0 0 0 0),:'GRIDZOOM';0.5) grid <"0 pfchart ''
It might also be an improvement to add the Year labels as column headers using
HDRCOL and HDRCOLMERGE instead of including them in the data grid.
OPTS=: ('GRIDMARGIN';0 0 0 0),:'GRIDZOOM';0.5
OPTS=: ('HDRCOLMERGE'; 1 ),('HDRCOL';<88 37#'2008';'2007') , OPTS
OPTS grid _5}. <"0 pfchart ''
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm