Mercurial > hg > octave-avbm
changeset 9468:5af462716bff
Add support for gnuplot's Lua-TikZ terminal.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Wed, 29 Jul 2009 07:22:05 -0400 |
parents | 49f890499ebc |
children | c6edba80dfae |
files | scripts/ChangeLog scripts/plot/__go_draw_axes__.m scripts/plot/gnuplot_drawnow.m scripts/plot/print.m |
diffstat | 4 files changed, 23 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,9 @@ +2009-07-29 Ben Abbott <bpabbott@mac.com> + + * plot/__go_draw_axes__.m: Ignore fontnames for the Lua-TikZ terminal. + * plot/gnuplot_drawnow.m: Support the gnuplot terminal Lua-TikZ. + * plot/print.m: Support the gnuplot terminal Lua-TikZ. + 2009-07-29 Jaroslav Hajek <highegg@gmail.com> * plot/gnuplot_binary.m: Fix typo.
--- a/scripts/plot/__go_draw_axes__.m +++ b/scripts/plot/__go_draw_axes__.m @@ -1356,7 +1356,7 @@ endfunction function fontspec = create_fontspec (f, s, gp_term) - if (strcmp (f, "*")) + if (strcmp (f, "*") || strcmp (gp_term, "tikz")) fontspec = sprintf ("font \",%d\"", s); else fontspec = sprintf ("font \"%s,%d\"", f, s);
--- a/scripts/plot/gnuplot_drawnow.m +++ b/scripts/plot/gnuplot_drawnow.m @@ -202,7 +202,7 @@ ## Set terminal size. terminals_with_size = {"emf", "gif", "jpeg", "latex", "pbm", ... "pdf", "png", "postscript", "svg", ... - "epslatex", "pstex", "pslatex"}; + "epslatex", "pstex", "pslatex", "tikz"}; if (__gnuplot_has_feature__ ("x11_figure_position")) terminals_with_size{end+1} = "x11"; endif @@ -212,6 +212,8 @@ if (any (strncmpi (term, terminals_with_size, 3))) if (term_units_are_pixels (term)) size_str = sprintf ("size %d,%d", gnuplot_size); + elseif (strcmp (term, "tikz")) + size_str = sprintf ("size %.15gin,%.15gin", gnuplot_size); else size_str = sprintf ("size %.15g,%.15g", gnuplot_size); endif
--- a/scripts/plot/print.m +++ b/scripts/plot/print.m @@ -70,6 +70,8 @@ ## processed directly by @LaTeX{}. The other formats are intended to ## be included in a @LaTeX{} (or @TeX{}) document. The @code{tex} device ## is the same as the @code{epslatex} device. +## @item tikz +## Generate a LaTeX file using gnuplot's Lua/TikZ terminal. ## @item ill ## @itemx aifm ## Adobe Illustrator @@ -314,7 +316,7 @@ "gif", "pbm", "dxf", "mf", "svg", "hpgl", ... "ps", "ps2", "psc", "psc2", "eps", "eps2", ... "epsc", "epsc2", "emf", "pdf", "pslatex", ... - "epslatex", "epslatexstandalone", "pstex"}; + "epslatex", "epslatexstandalone", "pstex", "tikz"}; if (! any (strcmp (dev, dev_list)) && have_ghostscript) ghostscript_output = name; ghostscript_device = dev; @@ -387,7 +389,16 @@ if (! isempty (fontsize)) options = cstrcat (options, " ", fontsize); endif - + + elseif (strcmp (dev, "tikz")) + if (! isempty (font) && ! isempty (fontsize)) + options = cstrcat (options, "\"", font, ",", fontsize, "\" "); + elseif (! isempty (font)) + options = cstrcat (options, "\"", font, "\" "); + else + options = ""; + endif + elseif (strcmp (dev, "aifm") || strcmp (dev, "corel")) ## Adobe Illustrator, CorelDraw if (use_color >= 0)