Mercurial > octave
changeset 20969:984678f19352
Impproved support gnuplot terminals "eepic", "latex", "pstricks", & "texdraw".
(Part of Bug #44187).
* __gnuplot_drawnow__.m: Include "eepic" in list of terminals_with_size.
* print.m: Include the "eepic", "latex", "pstricks", and "texdraw" devices
in the doc-string. Alphabetize some/most of the devices.
* __gnuplot_print__.m: Add support for "eepic" and "latex". Check that
gnuplot recognizes terminals before using them.
author | Daniel J Sebald <daniel.sebald@ieee.org> |
---|---|
date | Wed, 23 Dec 2015 18:22:26 -0500 |
parents | 123da81b9176 |
children | 34d0497730e6 |
files | scripts/plot/util/__gnuplot_drawnow__.m scripts/plot/util/print.m scripts/plot/util/private/__gnuplot_print__.m |
diffstat | 3 files changed, 37 insertions(+), 25 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/util/__gnuplot_drawnow__.m Wed Dec 23 17:44:05 2015 -0500 +++ b/scripts/plot/util/__gnuplot_drawnow__.m Wed Dec 23 18:22:26 2015 -0500 @@ -189,11 +189,11 @@ gnuplot_size = gnuplot_size / 72; endif if (all (gnuplot_size > 0)) - terminals_with_size = {"canvas", "cairolatex", "emf", "epscairo", ... - "epslatex", "fig", "gif", "jpeg", "latex", ... - "pbm", "pdf", "pdfcairo", "postscript", ... - "png", "pngcairo", "pstex", "pslatex", ... - "svg", "tikz"}; + terminals_with_size = {"canvas", "cairolatex", "eepic", "emf", ... + "epscairo", "epslatex", "fig", "gif", ... + "jpeg", "latex", "pbm", "pdf", "pdfcairo", ... + "postscript", "png", "pngcairo", "pstex", ... + "pslatex", "svg", "tikz"}; if (__gnuplot_has_feature__ ("windows_figure_position")) terminals_with_size{end+1} = "windows"; endif
--- a/scripts/plot/util/print.m Wed Dec 23 17:44:05 2015 -0500 +++ b/scripts/plot/util/print.m Wed Dec 23 18:22:26 2015 -0500 @@ -139,13 +139,6 @@ ## The @samp{standalone} variants behave as described for ## @samp{epslatexstandalone} above. ## -## @item tikz -## @itemx tikzstandalone -## Generate a @LaTeX{} file using PGF/TikZ@. For the FLTK toolkit -## the result is PGF. The @samp{tikzstandalone} device produces a @LaTeX{} -## document which includes the TikZ file (@samp{tikzstandalone} is only -## available with the gnuplot graohpics toolkit). -## ## @item ill ## @itemx aifm ## Adobe Illustrator (Obsolete for Gnuplot versions > 4.2) @@ -165,31 +158,42 @@ ## XFig. For the Gnuplot graphics toolkit, the additional options ## @option{-textspecial} or @option{-textnormal} can be used to control whether the special flag should be set for the text in the figure. (default is @option{-textnormal}) ## +## @item gif +## GIF image (only available for the Gnuplot graphics toolkit) +## ## @item hpgl ## HP plotter language ## +## @item jpg +## @itemx jpeg +## JPEG image +## +## @item latex +## @LaTeX picture environment (only available with the gnuplot graphics +## toolkit). +## ## @item mf ## Metafont ## ## @item png ## Portable network graphics ## -## @item jpg -## @itemx jpeg -## JPEG image -## -## @item gif -## GIF image (only available for the Gnuplot graphics toolkit) -## ## @item pbm ## PBMplus ## +## @item pdf +## Portable document format +## @end table +## ## @item svg ## Scalable vector graphics ## -## @item pdf -## Portable document format -## @end table +## @item tikz +## @itemx tikzstandalone +## Generate a @LaTeX{} file using PGF/TikZ@. For the FLTK toolkit +## the result is PGF. The @samp{tikzstandalone} device produces a @LaTeX{} +## document which includes the TikZ file (@samp{tikzstandalone} is only +## available with the gnuplot graphics toolkit). ## ## If the device is omitted, it is inferred from the file extension, ## or if there is no filename it is sent to the printer as PostScript.
--- a/scripts/plot/util/private/__gnuplot_print__.m Wed Dec 23 17:44:05 2015 -0500 +++ b/scripts/plot/util/private/__gnuplot_print__.m Wed Dec 23 18:22:26 2015 -0500 @@ -112,7 +112,9 @@ endif case "svg" local_drawnow (["svg dynamic " gp_opts], opts.name, opts); - case {"aifm", "corel", "eepic", "emf", "fig"} + case {"eepic"} + local_drawnow ([opts.devopt " color rotate " gp_opts], opts.name, opts); + case {"aifm", "corel", "emf", "fig"} local_drawnow ([opts.devopt " " gp_opts], opts.name, opts); case {"cairolatex", "epscairo", "epscairolatex", ... "epscairolatexstandalone", "pdfcairo", "pdfcairolatex", ... @@ -136,8 +138,14 @@ "print.m: '%s' output is not available for gnuplot-%s", upper (opts.devopt), __gnuplot_version__ ()); endif - case {"canvas", "dxf", "hpgl", "mf", "gif", "pstricks", "texdraw"} - local_drawnow ([opts.devopt " " gp_opts], opts.name, opts); + case {"canvas", "dxf", "hpgl", "latex", "mf", "gif", "pstricks", "texdraw"} + if (__gnuplot_has_terminal__ (opts.devopt)) + local_drawnow ([opts.devopt " " gp_opts], opts.name, opts); + else + error (sprintf ("print:no%soutput", opts.devopt), + "print.m: '%s' output is not available for gnuplot-%s", + upper (opts.devopt), __gnuplot_version__ ()); + endif case opts.ghostscript.device gp_opts = font_spec (opts, "devopt", "eps"); opts.ghostscript.output = opts.name;