# HG changeset patch # User Ben Abbott # Date 1248866525 14400 # Node ID 5af462716bff3985df25e3ab11c43d03346800f5 # Parent 49f890499ebccc4ec29293890427e9bc4b17f6fa Add support for gnuplot's Lua-TikZ terminal. diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,9 @@ +2009-07-29 Ben Abbott + + * 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 * plot/gnuplot_binary.m: Fix typo. diff --git a/scripts/plot/__go_draw_axes__.m b/scripts/plot/__go_draw_axes__.m --- 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); diff --git a/scripts/plot/gnuplot_drawnow.m b/scripts/plot/gnuplot_drawnow.m --- 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 diff --git a/scripts/plot/print.m b/scripts/plot/print.m --- 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)