diff scripts/plot/util/print.m @ 26103:9cfbe7688368

Add -fillpage and -bestfit print options (bug #52838). NEWS: Announce new options. * __print_parse_opts__.m: New structure member resize_flag initialized to "". Decode opts and set resize_flag to "fillpage" or "bestfit" if options found. Validate that options are only used with a page-based format. If resize option given, change the "paperposition" property of figure and then let rest of print routine handle the work. * __print_parse_opts__.m (gs_papersize): Add new second return argument which is the "papersize" figure property measured in points. * print.m: Update documentation with new options. * contributors.in: Add Jun Wang to list of contributors.
author Jun Wang <jstzwj@aliyun.com>
date Tue, 20 Nov 2018 14:39:17 -0800
parents 15ebd65f18c9
children 0e4b9df85361
line wrap: on
line diff
--- a/scripts/plot/util/print.m	Tue Nov 20 14:06:40 2018 -0800
+++ b/scripts/plot/util/print.m	Tue Nov 20 14:39:17 2018 -0800
@@ -139,6 +139,15 @@
 ## orientation specified.  This option is equivalent to changing the figure's
 ## @qcode{"paperorientation"} property.
 ##
+## @item  -fillpage
+## @itemx -bestfit
+##   When using a page-based format (PDF, PostScript, printer) ignore the
+## @qcode{"paperposition"} property and have the plot occupy the entire page.
+## The option @option{-fillpage} will stretch the plot to occupy the page with
+## 0.25 inch margins all around.  The option @option{-bestfit} will expand the
+## plot to take up as much room as possible on the page @strong{without}
+## distorting the original aspect ratio of the plot.
+##
 ## @item  -color
 ## @itemx -mono
 ##   Color or monochrome output.