On 9-Mar-2009, Ben Abbott wrote:
| The attached changeset introduces Matlab compatible printing.
|
| The positioning of the tick-labels, axes-labels, and title has also
| been improved (these seemingly separate features are intertwined).
|
| In any event, some examples exercising the new functionality (note
| these use default terminal fonts (*). If you encounter a problem,
let
| me know).
|
| (1) ex: 6x4.5in figure of surfl(peaks) in the formats; eps, pdf, png
| at screen resolution, and png at 300dpi.
|
| set (0, "defaultaxesfontsize", 12)
| set (0, "defaultetxtfontsize", 12)
| set (0, "defaultaxesfontname", "*")
| set (0, "defaultetxtfontname", "*")
| figure (1)
| clf
| surfl (peaks ())
| xlabel ("X")
| ylabel ("Y")
| zlabel ("Z")
| title ("surfl (peaks ())")
| set (gcf, "paperunits", "inches")
| set (gcf, "papersize", [6, 4.5])
| set (gcf, "papertype", "<custom>")
| set (gcf, "paperposition", [0, 0, 6, 4.5])
| print (gcf, "-deps", "test_surfl.eps")
| print (gcf, "-dpdf", "test_surfl.pdf")
| print (gcf, "-dpng", "test_surfl.png")
| print (gcf, "-dpng", "-r300", "test_surfl-300dpi.png")
When I try these commands, the pdf version fails because my gnuplot
(4.2.4, Debian testing) wasn't built with pdf support (why not?) and
then gnuplot spews a lot of "invalid character" messages. Maybe we
need to detect whether a terminal is supported and then fail a bit
more gracefully. But don't worry about fixing that in this changeset.
Also, for the PNG terminal type, I get messages about Arial not being
found. I don't care whether the default is Arial or Helvetica, but if
it still fails, why switch to Arial? How can we make this just work?
Again, this is probably something that you don't need to fix in this
changeset, but I do think we need to fix it before 3.2.
| (3) Try running the demos for "gnuplot_label_offset" from the Octave
| command line to see some examples of how the tick-labels, axes-
labels,
| and title are positioned for several differnt situations. These
demos
| are intended for evaluation puposes only, and should be removed
before
| being committed.
Does it cause any trouble to keep the demos? If not, then I'd say
keep them.
| In addition, the gnuplot_label_offset function should
| be incorporated into __go_draw_axes__.m.
OK.
| (1) The present status of Octave relies upon the user to properly
| specify the axes "position" and "units" (normalized) properties, as
| well as the figure properties; "position", "units" (pixels),
| "papersize", "papertype", "paperposition", and
"paperuntis" (inches).
I'm not sure I understand. Are they no reasonable defaults that could
be set?
| To produce expected results for objects with the fontname "*",
| gnuplot_drawnow() will substitute the same default as used by
gnuplot
| itself, or when there are no standard gnuplot defaults, will favor
| Helvetica (for consistency with Matlab).
Then why does your changeset use Arial?