Mercurial > hg > octave-nkf
diff scripts/plot/appearance/legend.m @ 17885:1d109119ac71
legend.m: Don't add listener for 'fontsize' if using gnuplot.
Temporary hack to produce images for Octave manual for 3.8.0 release.
* scripts/plot/appearance/legend.m: When toolkit is gnuplot, don't add
listener on 'fontsize' property.
author | Rik <rik@octave.org> |
---|---|
date | Fri, 08 Nov 2013 08:31:09 -0800 |
parents | d63878346099 |
children | be3702a2eb8a 446c46af4b42 |
line wrap: on
line diff
--- a/scripts/plot/appearance/legend.m +++ b/scripts/plot/appearance/legend.m @@ -1004,7 +1004,16 @@ addlistener (hlegend, "textcolor", @updatelegendtext); ## Properties which could change size of box, such as fontsize, ## require legend to be redrawn. - addlistener (hlegend, "fontsize", @updatelegend); + ## FIXME: fontsize is changed by print.m function during the + ## production of a plot for output. This screws things up + ## because legend tries to return the axes size to what it + ## was when the figure was created, versus what it is now + ## when the figure is being printed. Temporary hack is + ## good enough for generating the Octave manual which still + ## relies on gnuplot for generating images. See bug #40333. + if (! gnuplot) + addlistener (hlegend, "fontsize", @updatelegend); + endif addlistener (hlegend, "fontunits", @updatelegend); addlistener (hlegend, "interpreter", @updatelegend); addlistener (hlegend, "location", @updatelegend);