Mercurial > octave
changeset 26191:f41494a4977f
Add "dumb" terminal to produce ASCII art with gnuplot (patch #8203).
* print.m: Document new terminal "dumb" in raster output section.
* __print_parse_opts__.m: Add "dumb" to the list of devices: dev_list.
Add "txt" to the list of file extensions: suffixes.
* __gnuplot_print__.m: Decode "dumb" in switch statement and call local_drawnow
with "dumb" terminal.
author | Rüdiger Sonderfeld <ruediger@c-plusplus.de> |
---|---|
date | Sat, 05 Oct 2013 02:21:10 +0200 |
parents | c2137ac45dd9 |
children | 6c482f11f9ad |
files | NEWS scripts/plot/util/print.m scripts/plot/util/private/__gnuplot_print__.m scripts/plot/util/private/__print_parse_opts__.m |
diffstat | 4 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS Mon Dec 10 18:21:58 2018 +0100 +++ b/NEWS Sat Oct 05 02:21:10 2013 +0200 @@ -126,6 +126,9 @@ compatibility. To produce uncompressed images use the -dtiffn device. + ** A new printing device is available, -ddumb, which produces ASCII art + for plots. This device is only available with the gnuplot toolkit. + ** Printing to EPS files now uses a tight bounding box ("-tight" argument to print) by default. This makes more sense for EPS files which are normally embedded within other documents, and is
--- a/scripts/plot/util/print.m Mon Dec 10 18:21:58 2018 +0100 +++ b/scripts/plot/util/print.m Sat Oct 05 02:21:10 2013 +0200 @@ -339,7 +339,6 @@ ## @samp{tikzstandalone} device produces a @LaTeX{} document which includes the ## TikZ file. ## -## ## @end table ## ## Raster Formats @@ -364,6 +363,9 @@ ## @item pbm ## PBMplus ## +## @item dumb* +## ASCII art +## ## @end table ## ## If the device is omitted, it is inferred from the file extension,
--- a/scripts/plot/util/private/__gnuplot_print__.m Mon Dec 10 18:21:58 2018 +0100 +++ b/scripts/plot/util/private/__gnuplot_print__.m Sat Oct 05 02:21:10 2013 +0200 @@ -156,6 +156,8 @@ "print.m: '%s' output is not available for gnuplot-%s", upper (opts.devopt), __gnuplot_version__ ()); endif + case "dumb" + local_drawnow ("dumb size 72,24", opts.name, opts); case opts.ghostscript.device gp_opts = font_spec (opts, "devopt", "eps"); opts.ghostscript.output = opts.name;
--- a/scripts/plot/util/private/__print_parse_opts__.m Mon Dec 10 18:21:58 2018 +0100 +++ b/scripts/plot/util/private/__print_parse_opts__.m Sat Oct 05 02:21:10 2013 +0200 @@ -264,7 +264,7 @@ arg_st.devopt = "pdfwrite"; endif - persistent dev_list = [{"aifm", "corel", "fig", "png", "jpeg", ... + persistent dev_list = [{"aifm", "corel", "dumb", "fig", "png", "jpeg", ... "gif", "pbm", "pbmraw", "dxf", "mf", ... "svg", "hpgl", "ps", "ps2", "psc", ... "psc2", "eps", "eps2", "epsc", "epsc2", ... @@ -279,7 +279,7 @@ "epswrite", "eps2write", "pswrite", "ps2write", "pdfwrite", ... "canvas", "cgm", "latex", "eepic"}, gl_devlist]; - persistent suffixes = [{"ai", "cdr", "fig", "png", "jpg", ... + persistent suffixes = [{"ai", "cdr", "txt", "fig", "png", "jpg", ... "gif", "pbm", "pbm", "dxf", "mf", ... "svg", "hpgl", "ps", "ps", "ps", ... "ps", "eps", "eps", "eps", "eps", ...