Mercurial > octave
changeset 22037:782ecfde4859
doc: Create images for manual with legends that don't extend out of axes box.
* geometryimages.m, interpimages.m, splineimages.m:
Set defaultfigureposition to value which does not cause legend.m to resize
legend box (work around bug #39697). Use image size of 8x6 inches so that
printed result now matches what appears on screen when plotting the same
figure.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 04 Jul 2016 21:01:23 -0700 |
parents | a2c29df93df7 |
children | a4eb6d3de9f0 |
files | doc/interpreter/geometryimages.m doc/interpreter/interpimages.m doc/interpreter/splineimages.m |
diffstat | 3 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/interpreter/geometryimages.m Mon Jul 04 20:21:14 2016 -0400 +++ b/doc/interpreter/geometryimages.m Mon Jul 04 21:01:23 2016 -0700 @@ -153,12 +153,14 @@ endfunction function set_print_size () - image_size = [5.0, 3.5]; # in inches, 16:9 format + image_size = [8.0, 6.0]; # in inches, 4:3 format border = 0; # For postscript use 50/72 set (0, "defaultfigurepapertype", "<custom>"); set (0, "defaultfigurepaperorientation", "landscape"); set (0, "defaultfigurepapersize", image_size + 2*border); set (0, "defaultfigurepaperposition", [border, border, image_size]); + ## FIXME: Required until listener for legend exists (bug #39697) + set (0, "defaultfigureposition", [ 72*[border, border, image_size] ]); endfunction ## Use this function before plotting commands and after every call to print
--- a/doc/interpreter/interpimages.m Mon Jul 04 20:21:14 2016 -0400 +++ b/doc/interpreter/interpimages.m Mon Jul 04 21:01:23 2016 -0700 @@ -96,12 +96,14 @@ endfunction function set_print_size () - image_size = [5.0, 3.5]; # in inches, 16:9 format + image_size = [8.0, 6.0]; # in inches, 4:3 format border = 0; # For postscript use 50/72 set (0, "defaultfigurepapertype", "<custom>"); set (0, "defaultfigurepaperorientation", "landscape"); set (0, "defaultfigurepapersize", image_size + 2*border); set (0, "defaultfigurepaperposition", [border, border, image_size]); + ## FIXME: Required until listener for legend exists (bug #39697) + set (0, "defaultfigureposition", [ 72*[border, border, image_size] ]); endfunction ## Use this function before plotting commands and after every call to print
--- a/doc/interpreter/splineimages.m Mon Jul 04 20:21:14 2016 -0400 +++ b/doc/interpreter/splineimages.m Mon Jul 04 21:01:23 2016 -0700 @@ -177,12 +177,14 @@ endfunction function set_print_size () - image_size = [5.0, 3.5]; # in inches, 16:9 format + image_size = [8.0, 6.0]; # in inches, 4:3 format border = 0; # For postscript use 50/72 set (0, "defaultfigurepapertype", "<custom>"); set (0, "defaultfigurepaperorientation", "landscape"); set (0, "defaultfigurepapersize", image_size + 2*border); set (0, "defaultfigurepaperposition", [border, border, image_size]); + ## FIXME: Required until listener for legend exists (bug #39697) + set (0, "defaultfigureposition", [ 72*[border, border, image_size] ]); endfunction ## Use this function before plotting commands and after every call to print