# HG changeset patch # User Pantxo Diribarne # Date 1435184552 -7200 # Node ID 42b7d7758c4a50da42831ad022cd3b365da26381 # Parent 6db2ea5556a44006bf344726635c9b6276b15bc0 Remove axes "interpreter" property (bug #45388) * graphics.in.h (axes::properties): remove interpreter property * genpropdoc.m: remove "interpreter" from the list of axes properties * legend.m: create legend axes specific "interpreter" property * polar.m: bind labels "interpreter" to the axes "ticklabelinterpreter" * cla.m: use "ticklabelinterpreter" in test * __go_draw_axes__.m: use "ticklabelinterpreter" property for axes objects diff -r 6db2ea5556a4 -r 42b7d7758c4a doc/interpreter/genpropdoc.m --- a/doc/interpreter/genpropdoc.m Tue Jun 23 22:21:50 2015 +0200 +++ b/doc/interpreter/genpropdoc.m Thu Jun 25 00:22:32 2015 +0200 @@ -591,8 +591,7 @@ s.doc = doc_unused; case "gridlinestyle" - case "interpreter" - + case "labelfontsizemultiplier" s.doc = doc_unused; diff -r 6db2ea5556a4 -r 42b7d7758c4a libinterp/corefcn/graphics.in.h --- a/libinterp/corefcn/graphics.in.h Tue Jun 23 22:21:50 2015 +0200 +++ b/libinterp/corefcn/graphics.in.h Thu Jun 25 00:22:32 2015 +0200 @@ -3929,9 +3929,6 @@ color_property gridcolor , color_property (color_values (0.15, 0.15, 0.15), radio_values ("none")) radio_property gridcolormode , "{auto}|manual" radio_property gridlinestyle , "{:}|-|--|-.|none" - // NOTE: interpreter is not a Matlab axis property, but it makes - // more sense to have it so that axis ticklabels can use it. - radio_property interpreter , "{tex}|latex|none" double_property labelfontsizemultiplier , 1.1 radio_property layer u , "{bottom}|top" // FIXME: should be kind of string array. diff -r 6db2ea5556a4 -r 42b7d7758c4a scripts/plot/appearance/legend.m --- a/scripts/plot/appearance/legend.m Tue Jun 23 22:21:50 2015 +0200 +++ b/scripts/plot/appearance/legend.m Thu Jun 25 00:22:32 2015 +0200 @@ -586,8 +586,7 @@ "xtick", [], "ytick", [], "xlim", [0, 1], "ylim", [0, 1], "visible", ifelse (strcmp (box, "on"), "on", "off"), - "activepositionproperty", "position", - "interpreter", "tex"); + "activepositionproperty", "position"); ## Inherit properties from current axis ## "fontunits" shoud be first because it affects interpretation ## of "fontsize" property @@ -613,6 +612,7 @@ addproperty ("orientation", hlegend, "radio", "{vertical}|horizontal"); addproperty ("string", hlegend, "any", text_strings); + addproperty ("interpreter", hlegend, "textinterpreter"); addproperty ("textposition", hlegend, "radio", "left|{right}"); endif ## Inherit visual properties from legend object diff -r 6db2ea5556a4 -r 42b7d7758c4a scripts/plot/draw/polar.m --- a/scripts/plot/draw/polar.m Tue Jun 23 22:21:50 2015 +0200 +++ b/scripts/plot/draw/polar.m Thu Jun 25 00:22:32 2015 +0200 @@ -127,7 +127,8 @@ addlistener (hax, "fontsize", {@__update_text__, hg, "fontsize"}); addlistener (hax, "fontunits", {@__update_text__, hg, "fontunits"}); addlistener (hax, "fontweight", {@__update_text__, hg, "fontweight"}); - addlistener (hax, "interpreter", {@__update_text__, hg, "interpreter"}); + addlistener (hax, "ticklabelinterpreter", + {@__update_text__, hg, "interpreter"}); addlistener (hax, "layer", {@__update_layer__, hg}); addlistener (hax, "gridlinestyle",{@__update_lines__,hg,"gridlinestyle"}); addlistener (hax, "linewidth", {@__update_lines__, hg, "linewidth"}); @@ -320,8 +321,10 @@ "linewidth", get(hax, "linewidth")}; ## "fontunits" should be first because it affects "fontsize" property. tprops(1:2:12) = {"fontunits", "fontangle", "fontname", "fontsize", ... - "fontweight", "interpreter"}; + "fontweight", "ticklabelinterpreter"}; tprops(2:2:12) = get (hax, tprops(1:2:12)); + tprops(1:2:12) = strrep (tprops(1:2:12), "ticklabelinterpreter", + "interpreter"); ## The number of points used for a circle circle_points = 50; @@ -376,7 +379,7 @@ dellistener (hax, "fontsize"); dellistener (hax, "fontunits"); dellistener (hax, "fontweight"); - dellistener (hax, "interpreter"); + dellistener (hax, "ticklabelinterpreter"); dellistener (hax, "layer"); dellistener (hax, "gridlinestyle"); dellistener (hax, "linewidth"); diff -r 6db2ea5556a4 -r 42b7d7758c4a scripts/plot/util/cla.m --- a/scripts/plot/util/cla.m Tue Jun 23 22:21:50 2015 +0200 +++ b/scripts/plot/util/cla.m Thu Jun 25 00:22:32 2015 +0200 @@ -92,16 +92,16 @@ %! unwind_protect %! hax = gca; %! plot (hax, 1:10); -%! set (hax, "interpreter", "tex"); +%! set (hax, "ticklabelinterpreter", "none"); %! cla (hax); %! kids = get (hax, "children"); %! assert (numel (kids), 0); -%! assert (get (hax, "interpreter"), "tex"); +%! assert (get (hax, "ticklabelinterpreter"), "none"); %! plot (hax, 1:10); %! cla (hax, "reset"); %! kids = get (hax, "children"); %! assert (numel (kids), 0); -%! assert (get (hax, "interpreter"), "none"); +%! assert (get (hax, "ticklabelinterpreter"), "tex"); %! unwind_protect_cleanup %! close (hf); %! end_unwind_protect diff -r 6db2ea5556a4 -r 42b7d7758c4a scripts/plot/util/private/__go_draw_axes__.m --- a/scripts/plot/util/private/__go_draw_axes__.m Tue Jun 23 22:21:50 2015 +0200 +++ b/scripts/plot/util/private/__go_draw_axes__.m Thu Jun 25 00:22:32 2015 +0200 @@ -2081,62 +2081,62 @@ do_tics_1 (obj.xtickmode, obj.xtick, obj.xminortick, obj.xticklabelmode, obj.xticklabel, obj.xcolor, "x2", plot_stream, true, mono, "border", obj.tickdir, ticklength, fontname, fontspec, - obj.interpreter, obj.xscale, obj.xsgn, gnuplot_term); + obj.ticklabelinterpreter, obj.xscale, obj.xsgn, gnuplot_term); do_tics_1 ("manual", [], "off", obj.xticklabelmode, obj.xticklabel, obj.xcolor, "x", plot_stream, true, mono, "border", - "", "", fontname, fontspec, obj.interpreter, obj.xscale, - obj.xsgn, gnuplot_term); + "", "", fontname, fontspec, obj.ticklabelinterpreter, + obj.xscale, obj.xsgn, gnuplot_term); elseif (strcmpi (obj.xaxislocation, "zero")) do_tics_1 (obj.xtickmode, obj.xtick, obj.xminortick, obj.xticklabelmode, obj.xticklabel, obj.xcolor, "x", plot_stream, true, mono, "axis", obj.tickdir, ticklength, fontname, fontspec, - obj.interpreter, obj.xscale, obj.xsgn, gnuplot_term); + obj.ticklabelinterpreter, obj.xscale, obj.xsgn, gnuplot_term); do_tics_1 ("manual", [], "off", obj.xticklabelmode, obj.xticklabel, obj.xcolor, "x2", plot_stream, true, mono, "axis", - "", "", fontname, fontspec, obj.interpreter, obj.xscale, - obj.xsgn, gnuplot_term); + "", "", fontname, fontspec, obj.ticklabelinterpreter, + obj.xscale, obj.xsgn, gnuplot_term); else do_tics_1 (obj.xtickmode, obj.xtick, obj.xminortick, obj.xticklabelmode, obj.xticklabel, obj.xcolor, "x", plot_stream, true, mono, "border", obj.tickdir, ticklength, fontname, fontspec, - obj.interpreter, obj.xscale, obj.xsgn, gnuplot_term); + obj.ticklabelinterpreter, obj.xscale, obj.xsgn, gnuplot_term); do_tics_1 ("manual", [], "off", obj.xticklabelmode, obj.xticklabel, obj.xcolor, "x2", plot_stream, true, mono, "border", - "", "", fontname, fontspec, obj.interpreter, obj.xscale, - obj.xsgn, gnuplot_term); + "", "", fontname, fontspec, obj.ticklabelinterpreter, + obj.xscale, obj.xsgn, gnuplot_term); endif if (strcmpi (obj.yaxislocation, "right")) do_tics_1 (obj.ytickmode, obj.ytick, obj.yminortick, obj.yticklabelmode, obj.yticklabel, obj.ycolor, "y2", plot_stream, ymirror, mono, "border", obj.tickdir, ticklength, fontname, fontspec, - obj.interpreter, obj.yscale, obj.ysgn, gnuplot_term); + obj.ticklabelinterpreter, obj.yscale, obj.ysgn, gnuplot_term); do_tics_1 ("manual", [], "off", obj.yticklabelmode, obj.yticklabel, obj.ycolor, "y", plot_stream, ymirror, mono, "border", - "", "", fontname, fontspec, obj.interpreter, obj.yscale, - obj.ysgn, gnuplot_term); + "", "", fontname, fontspec, obj.ticklabelinterpreter, + obj.yscale, obj.ysgn, gnuplot_term); elseif (strcmpi (obj.yaxislocation, "zero")) do_tics_1 (obj.ytickmode, obj.ytick, obj.yminortick, obj.yticklabelmode, obj.yticklabel, obj.ycolor, "y", plot_stream, ymirror, mono, "axis", obj.tickdir, ticklength, fontname, fontspec, - obj.interpreter, obj.yscale, obj.ysgn, gnuplot_term); + obj.ticklabelinterpreter, obj.yscale, obj.ysgn, gnuplot_term); do_tics_1 ("manual", [], "off", obj.yticklabelmode, obj.yticklabel, obj.ycolor, "y2", plot_stream, ymirror, mono, "axis", - "", "", fontname, fontspec, obj.interpreter, obj.yscale, - obj.ysgn, gnuplot_term); + "", "", fontname, fontspec, obj.ticklabelinterpreter, + obj.yscale, obj.ysgn, gnuplot_term); else do_tics_1 (obj.ytickmode, obj.ytick, obj.yminortick, obj.yticklabelmode, obj.yticklabel, obj.ycolor, "y", plot_stream, ymirror, mono, "border", obj.tickdir, ticklength, fontname, fontspec, - obj.interpreter, obj.yscale, obj.ysgn, gnuplot_term); + obj.ticklabelinterpreter, obj.yscale, obj.ysgn, gnuplot_term); do_tics_1 ("manual", [], "off", obj.yticklabelmode, obj.yticklabel, obj.ycolor, "y2", plot_stream, ymirror, mono, "border", - "", "", fontname, fontspec, obj.interpreter, obj.yscale, - obj.ysgn, gnuplot_term); + "", "", fontname, fontspec, obj.ticklabelinterpreter, + obj.yscale, obj.ysgn, gnuplot_term); endif do_tics_1 (obj.ztickmode, obj.ztick, obj.zminortick, obj.zticklabelmode, obj.zticklabel, obj.zcolor, "z", plot_stream, true, mono, "border", obj.tickdir, ticklength, fontname, fontspec, - obj.interpreter, obj.zscale, obj.zsgn, gnuplot_term); + obj.ticklabelinterpreter, obj.zscale, obj.zsgn, gnuplot_term); endfunction function do_tics_1 (ticmode, tics, mtics, labelmode, labels, color, ax,