Mercurial > octave
annotate scripts/plot/appearance/legend.m @ 22755:3a2b891d0b33
maint: Standardize Copyright formatting.
* Makefile.am, README, build-aux/check-subst-vars.in.sh,
build-aux/find-files-with-tests.sh, build-aux/mk-builtins.sh,
build-aux/mk-default-qt-settings.in.sh, build-aux/mk-f77-def.in.sh,
build-aux/mk-hg-id.sh, build-aux/mk-mxarray-h.in.sh,
build-aux/mk-octave-config-h.sh, build-aux/mk-opts.pl,
build-aux/mk-version-h.in.sh, build-aux/subst-config-vals.in.sh,
build-aux/subst-cross-config-vals.in.sh, build-aux/subst-default-vals.in.sh,
build-aux/subst-f77-isnan-macro.in.sh, build-aux/subst-script-vals.in.sh,
configure.ac, doc/interpreter/arith.txi, doc/interpreter/audio.txi,
doc/interpreter/basics.txi, doc/interpreter/bugs.txi,
doc/interpreter/container.txi, doc/interpreter/cp-idx.txi,
doc/interpreter/data.txi, doc/interpreter/debug.txi,
doc/interpreter/diagperm.txi, doc/interpreter/diffeq.txi,
doc/interpreter/errors.txi, doc/interpreter/eval.txi, doc/interpreter/expr.txi,
doc/interpreter/external.txi, doc/interpreter/fn-idx.txi,
doc/interpreter/func.txi, doc/interpreter/genpropdoc.m,
doc/interpreter/geometry.txi, doc/interpreter/geometryimages.m,
doc/interpreter/grammar.txi, doc/interpreter/gui.txi,
doc/interpreter/image.txi, doc/interpreter/install.txi,
doc/interpreter/interp.txi, doc/interpreter/interpimages.m,
doc/interpreter/intro.txi, doc/interpreter/io.txi, doc/interpreter/linalg.txi,
doc/interpreter/macros.texi, doc/interpreter/matrix.txi,
doc/interpreter/mk-doc-cache.pl, doc/interpreter/mkoctfile.1,
doc/interpreter/nonlin.txi, doc/interpreter/numbers.txi,
doc/interpreter/obsolete.txi, doc/interpreter/octave-cli.1,
doc/interpreter/octave-config.1, doc/interpreter/octave.1,
doc/interpreter/octave.css, doc/interpreter/octave.texi,
doc/interpreter/oop.txi, doc/interpreter/op-idx.txi, doc/interpreter/optim.txi,
doc/interpreter/package.txi, doc/interpreter/plot.txi,
doc/interpreter/plotimages.m, doc/interpreter/poly.txi,
doc/interpreter/preface.txi, doc/interpreter/quad.txi, doc/interpreter/set.txi,
doc/interpreter/signal.txi, doc/interpreter/sparse.txi,
doc/interpreter/sparseimages.m, doc/interpreter/splineimages.m,
doc/interpreter/stats.txi, doc/interpreter/stmt.txi,
doc/interpreter/strings.txi, doc/interpreter/system.txi,
doc/interpreter/testfun.txi, doc/interpreter/var.txi,
doc/interpreter/vectorize.txi, doc/liboctave/array.texi,
doc/liboctave/bugs.texi, doc/liboctave/cp-idx.texi, doc/liboctave/dae.texi,
doc/liboctave/diffeq.texi, doc/liboctave/error.texi, doc/liboctave/factor.texi,
doc/liboctave/fn-idx.texi, doc/liboctave/gpl.texi, doc/liboctave/install.texi,
doc/liboctave/intro.texi, doc/liboctave/liboctave.texi,
doc/liboctave/matvec.texi, doc/liboctave/nleqn.texi, doc/liboctave/nlfunc.texi,
doc/liboctave/ode.texi, doc/liboctave/optim.texi, doc/liboctave/preface.texi,
doc/liboctave/quad.texi, doc/liboctave/range.texi, doc/refcard/refcard-a4.tex,
doc/refcard/refcard-legal.tex, doc/refcard/refcard-letter.tex,
doc/refcard/refcard.tex, etc/HACKING, etc/icons/octave.appdata.xml.in,
libgui/graphics/Backend.cc, libgui/graphics/Backend.h,
libgui/graphics/BaseControl.cc, libgui/graphics/BaseControl.h,
libgui/graphics/ButtonControl.cc, libgui/graphics/ButtonControl.h,
libgui/graphics/ButtonGroup.cc, libgui/graphics/ButtonGroup.h,
libgui/graphics/Canvas.cc, libgui/graphics/Canvas.h,
libgui/graphics/CheckBoxControl.cc, libgui/graphics/CheckBoxControl.h,
libgui/graphics/Container.cc, libgui/graphics/Container.h,
libgui/graphics/ContextMenu.cc, libgui/graphics/ContextMenu.h,
libgui/graphics/EditControl.cc, libgui/graphics/EditControl.h,
libgui/graphics/Figure.cc, libgui/graphics/Figure.h,
libgui/graphics/FigureWindow.cc, libgui/graphics/FigureWindow.h,
libgui/graphics/GLCanvas.cc, libgui/graphics/GLCanvas.h,
libgui/graphics/GenericEventNotify.h, libgui/graphics/KeyMap.cc,
libgui/graphics/KeyMap.h, libgui/graphics/ListBoxControl.cc,
libgui/graphics/ListBoxControl.h, libgui/graphics/Logger.cc,
libgui/graphics/Logger.h, libgui/graphics/Menu.cc, libgui/graphics/Menu.h,
libgui/graphics/MenuContainer.h, libgui/graphics/MouseModeActionGroup.cc,
libgui/graphics/MouseModeActionGroup.h, libgui/graphics/Object.cc,
libgui/graphics/Object.h, libgui/graphics/ObjectFactory.cc,
libgui/graphics/ObjectFactory.h, libgui/graphics/ObjectProxy.cc,
libgui/graphics/ObjectProxy.h, libgui/graphics/Panel.cc,
libgui/graphics/Panel.h, libgui/graphics/PopupMenuControl.cc,
libgui/graphics/PopupMenuControl.h, libgui/graphics/PushButtonControl.cc,
libgui/graphics/PushButtonControl.h, libgui/graphics/PushTool.cc,
libgui/graphics/PushTool.h, libgui/graphics/QtHandlesUtils.cc,
libgui/graphics/QtHandlesUtils.h, libgui/graphics/RadioButtonControl.cc,
libgui/graphics/RadioButtonControl.h, libgui/graphics/SliderControl.cc,
libgui/graphics/SliderControl.h, libgui/graphics/TextControl.cc,
libgui/graphics/TextControl.h, libgui/graphics/TextEdit.cc,
libgui/graphics/TextEdit.h, libgui/graphics/ToggleButtonControl.cc,
libgui/graphics/ToggleButtonControl.h, libgui/graphics/ToggleTool.cc,
libgui/graphics/ToggleTool.h, libgui/graphics/ToolBar.cc,
libgui/graphics/ToolBar.h, libgui/graphics/ToolBarButton.cc,
libgui/graphics/ToolBarButton.h, libgui/graphics/__init_qt__.cc,
libgui/graphics/__init_qt__.h, libgui/graphics/annotation-dialog.cc,
libgui/graphics/annotation-dialog.h, libgui/graphics/gl-select.cc,
libgui/graphics/gl-select.h, libgui/src/color-picker.cc,
libgui/src/color-picker.h, libgui/src/dialog.cc, libgui/src/dialog.h,
libgui/src/documentation-dock-widget.cc,
libgui/src/documentation-dock-widget.h, libgui/src/files-dock-widget.cc,
libgui/src/files-dock-widget.h, libgui/src/find-files-dialog.cc,
libgui/src/find-files-dialog.h, libgui/src/find-files-model.cc,
libgui/src/find-files-model.h, libgui/src/history-dock-widget.cc,
libgui/src/history-dock-widget.h, libgui/src/liboctgui-build-info.h,
libgui/src/liboctgui-build-info.in.cc,
libgui/src/m-editor/file-editor-interface.h,
libgui/src/m-editor/file-editor-tab.cc, libgui/src/m-editor/file-editor-tab.h,
libgui/src/m-editor/file-editor.cc, libgui/src/m-editor/file-editor.h,
libgui/src/m-editor/find-dialog.cc, libgui/src/m-editor/find-dialog.h,
libgui/src/m-editor/marker.cc, libgui/src/m-editor/marker.h,
libgui/src/m-editor/octave-qscintilla.cc,
libgui/src/m-editor/octave-qscintilla.h,
libgui/src/m-editor/octave-txt-lexer.cc,
libgui/src/m-editor/octave-txt-lexer.h, libgui/src/main-window.cc,
libgui/src/main-window.h, libgui/src/octave-cmd.cc, libgui/src/octave-cmd.h,
libgui/src/octave-dock-widget.cc, libgui/src/octave-dock-widget.h,
libgui/src/octave-gui.cc, libgui/src/octave-gui.h,
libgui/src/octave-interpreter.cc, libgui/src/octave-interpreter.h,
libgui/src/octave-qt-link.cc, libgui/src/octave-qt-link.h,
libgui/src/qtinfo/parser.cc, libgui/src/qtinfo/parser.h,
libgui/src/qtinfo/webinfo.cc, libgui/src/qtinfo/webinfo.h,
libgui/src/resource-manager.cc, libgui/src/resource-manager.h,
libgui/src/settings-dialog.cc, libgui/src/settings-dialog.h,
libgui/src/shortcut-manager.cc, libgui/src/shortcut-manager.h,
libgui/src/terminal-dock-widget.cc, libgui/src/terminal-dock-widget.h,
libgui/src/thread-manager.cc, libgui/src/thread-manager.h,
libgui/src/welcome-wizard.cc, libgui/src/welcome-wizard.h,
libgui/src/workspace-model.cc, libgui/src/workspace-model.h,
libgui/src/workspace-view.cc, libgui/src/workspace-view.h,
libinterp/build-env.h, libinterp/build-env.in.cc, libinterp/builtins.h,
libinterp/corefcn/Cell.cc, libinterp/corefcn/Cell.h,
libinterp/corefcn/__contourc__.cc, libinterp/corefcn/__dsearchn__.cc,
libinterp/corefcn/__ichol__.cc, libinterp/corefcn/__ilu__.cc,
libinterp/corefcn/__lin_interpn__.cc, libinterp/corefcn/__luinc__.cc,
libinterp/corefcn/__magick_read__.cc, libinterp/corefcn/__pchip_deriv__.cc,
libinterp/corefcn/__qp__.cc, libinterp/corefcn/balance.cc,
libinterp/corefcn/base-text-renderer.h, libinterp/corefcn/besselj.cc,
libinterp/corefcn/betainc.cc, libinterp/corefcn/bitfcns.cc,
libinterp/corefcn/bsxfun.cc, libinterp/corefcn/c-file-ptr-stream.cc,
libinterp/corefcn/c-file-ptr-stream.h, libinterp/corefcn/call-stack.cc,
libinterp/corefcn/call-stack.h, libinterp/corefcn/cdisplay.c,
libinterp/corefcn/cdisplay.h, libinterp/corefcn/cellfun.cc,
libinterp/corefcn/coct-hdf5-types.c, libinterp/corefcn/colloc.cc,
libinterp/corefcn/comment-list.cc, libinterp/corefcn/comment-list.h,
libinterp/corefcn/conv2.cc, libinterp/corefcn/daspk.cc,
libinterp/corefcn/dasrt.cc, libinterp/corefcn/dassl.cc,
libinterp/corefcn/data.cc, libinterp/corefcn/data.h,
libinterp/corefcn/debug.cc, libinterp/corefcn/debug.h,
libinterp/corefcn/defaults.cc, libinterp/corefcn/defaults.in.h,
libinterp/corefcn/defun-dld.h, libinterp/corefcn/defun-int.h,
libinterp/corefcn/defun.cc, libinterp/corefcn/defun.h,
libinterp/corefcn/det.cc, libinterp/corefcn/dirfns.cc,
libinterp/corefcn/dirfns.h, libinterp/corefcn/display.cc,
libinterp/corefcn/display.h, libinterp/corefcn/dlmread.cc,
libinterp/corefcn/dot.cc, libinterp/corefcn/dynamic-ld.cc,
libinterp/corefcn/dynamic-ld.h, libinterp/corefcn/eig.cc,
libinterp/corefcn/ellipj.cc, libinterp/corefcn/error.cc,
libinterp/corefcn/error.h, libinterp/corefcn/errwarn.cc,
libinterp/corefcn/errwarn.h, libinterp/corefcn/event-queue.cc,
libinterp/corefcn/event-queue.h, libinterp/corefcn/fft.cc,
libinterp/corefcn/fft2.cc, libinterp/corefcn/fftn.cc,
libinterp/corefcn/file-io.cc, libinterp/corefcn/file-io.h,
libinterp/corefcn/filter.cc, libinterp/corefcn/find.cc,
libinterp/corefcn/ft-text-renderer.cc, libinterp/corefcn/ft-text-renderer.h,
libinterp/corefcn/gammainc.cc, libinterp/corefcn/gcd.cc,
libinterp/corefcn/getgrent.cc, libinterp/corefcn/getpwent.cc,
libinterp/corefcn/getrusage.cc, libinterp/corefcn/givens.cc,
libinterp/corefcn/gl-render.cc, libinterp/corefcn/gl-render.h,
libinterp/corefcn/gl2ps-print.cc, libinterp/corefcn/gl2ps-print.h,
libinterp/corefcn/graphics.cc, libinterp/corefcn/graphics.in.h,
libinterp/corefcn/gripes.cc, libinterp/corefcn/gripes.h,
libinterp/corefcn/gsvd.cc, libinterp/corefcn/hash.cc,
libinterp/corefcn/help.cc, libinterp/corefcn/help.h, libinterp/corefcn/hess.cc,
libinterp/corefcn/hex2num.cc, libinterp/corefcn/hook-fcn.cc,
libinterp/corefcn/hook-fcn.h, libinterp/corefcn/input.cc,
libinterp/corefcn/input.h, libinterp/corefcn/interpreter.cc,
libinterp/corefcn/interpreter.h, libinterp/corefcn/inv.cc,
libinterp/corefcn/jit-ir.cc, libinterp/corefcn/jit-ir.h,
libinterp/corefcn/jit-typeinfo.cc, libinterp/corefcn/jit-typeinfo.h,
libinterp/corefcn/jit-util.cc, libinterp/corefcn/jit-util.h,
libinterp/corefcn/kron.cc, libinterp/corefcn/load-path.cc,
libinterp/corefcn/load-path.h, libinterp/corefcn/load-save.cc,
libinterp/corefcn/load-save.h, libinterp/corefcn/lookup.cc,
libinterp/corefcn/ls-ascii-helper.cc, libinterp/corefcn/ls-ascii-helper.h,
libinterp/corefcn/ls-hdf5.cc, libinterp/corefcn/ls-hdf5.h,
libinterp/corefcn/ls-mat-ascii.cc, libinterp/corefcn/ls-mat-ascii.h,
libinterp/corefcn/ls-mat4.cc, libinterp/corefcn/ls-mat4.h,
libinterp/corefcn/ls-mat5.cc, libinterp/corefcn/ls-mat5.h,
libinterp/corefcn/ls-oct-binary.cc, libinterp/corefcn/ls-oct-binary.h,
libinterp/corefcn/ls-oct-text.cc, libinterp/corefcn/ls-oct-text.h,
libinterp/corefcn/ls-utils.cc, libinterp/corefcn/ls-utils.h,
libinterp/corefcn/lsode.cc, libinterp/corefcn/lu.cc,
libinterp/corefcn/mappers.cc, libinterp/corefcn/matrix_type.cc,
libinterp/corefcn/max.cc, libinterp/corefcn/mex.cc, libinterp/corefcn/mex.h,
libinterp/corefcn/mexproto.h, libinterp/corefcn/mgorth.cc,
libinterp/corefcn/mxarray.in.h, libinterp/corefcn/nproc.cc,
libinterp/corefcn/oct-errno.h, libinterp/corefcn/oct-errno.in.cc,
libinterp/corefcn/oct-fstrm.cc, libinterp/corefcn/oct-fstrm.h,
libinterp/corefcn/oct-handle.h, libinterp/corefcn/oct-hdf5-types.cc,
libinterp/corefcn/oct-hdf5-types.h, libinterp/corefcn/oct-hdf5.h,
libinterp/corefcn/oct-hist.cc, libinterp/corefcn/oct-hist.h,
libinterp/corefcn/oct-iostrm.cc, libinterp/corefcn/oct-iostrm.h,
libinterp/corefcn/oct-lvalue.cc, libinterp/corefcn/oct-lvalue.h,
libinterp/corefcn/oct-map.cc, libinterp/corefcn/oct-map.h,
libinterp/corefcn/oct-obj.h, libinterp/corefcn/oct-opengl.h,
libinterp/corefcn/oct-prcstrm.cc, libinterp/corefcn/oct-prcstrm.h,
libinterp/corefcn/oct-procbuf.cc, libinterp/corefcn/oct-procbuf.h,
libinterp/corefcn/oct-stdstrm.h, libinterp/corefcn/oct-stream.cc,
libinterp/corefcn/oct-stream.h, libinterp/corefcn/oct-strstrm.cc,
libinterp/corefcn/oct-strstrm.h, libinterp/corefcn/oct-tex-lexer.in.ll,
libinterp/corefcn/oct-tex-parser.in.yy, libinterp/corefcn/oct.h,
libinterp/corefcn/octave-default-image.h, libinterp/corefcn/octave-link.cc,
libinterp/corefcn/octave-link.h,
libinterp/corefcn/octave-preserve-stream-state.h,
libinterp/corefcn/ordschur.cc, libinterp/corefcn/pager.cc,
libinterp/corefcn/pager.h, libinterp/corefcn/pinv.cc,
libinterp/corefcn/pr-output.cc, libinterp/corefcn/pr-output.h,
libinterp/corefcn/procstream.cc, libinterp/corefcn/procstream.h,
libinterp/corefcn/profiler.cc, libinterp/corefcn/profiler.h,
libinterp/corefcn/psi.cc, libinterp/corefcn/pt-jit.cc,
libinterp/corefcn/pt-jit.h, libinterp/corefcn/quad.cc,
libinterp/corefcn/quadcc.cc, libinterp/corefcn/qz.cc,
libinterp/corefcn/rand.cc, libinterp/corefcn/rcond.cc,
libinterp/corefcn/regexp.cc, libinterp/corefcn/schur.cc,
libinterp/corefcn/sighandlers.cc, libinterp/corefcn/sighandlers.h,
libinterp/corefcn/sparse-xdiv.cc, libinterp/corefcn/sparse-xdiv.h,
libinterp/corefcn/sparse-xpow.cc, libinterp/corefcn/sparse-xpow.h,
libinterp/corefcn/sparse.cc, libinterp/corefcn/spparms.cc,
libinterp/corefcn/sqrtm.cc, libinterp/corefcn/str2double.cc,
libinterp/corefcn/strfind.cc, libinterp/corefcn/strfns.cc,
libinterp/corefcn/sub2ind.cc, libinterp/corefcn/svd.cc,
libinterp/corefcn/sylvester.cc, libinterp/corefcn/symtab.cc,
libinterp/corefcn/symtab.h, libinterp/corefcn/syscalls.cc,
libinterp/corefcn/sysdep.cc, libinterp/corefcn/sysdep.h,
libinterp/corefcn/text-renderer.cc, libinterp/corefcn/text-renderer.h,
libinterp/corefcn/time.cc, libinterp/corefcn/toplev.cc,
libinterp/corefcn/toplev.h, libinterp/corefcn/tril.cc,
libinterp/corefcn/tsearch.cc, libinterp/corefcn/txt-eng.cc,
libinterp/corefcn/txt-eng.h, libinterp/corefcn/typecast.cc,
libinterp/corefcn/urlwrite.cc, libinterp/corefcn/utils.cc,
libinterp/corefcn/utils.h, libinterp/corefcn/variables.cc,
libinterp/corefcn/variables.h, libinterp/corefcn/workspace-element.h,
libinterp/corefcn/xdiv.cc, libinterp/corefcn/xdiv.h,
libinterp/corefcn/xnorm.cc, libinterp/corefcn/xnorm.h,
libinterp/corefcn/xpow.cc, libinterp/corefcn/xpow.h,
libinterp/corefcn/zfstream.cc, libinterp/corefcn/zfstream.h,
libinterp/deprecated-config.h, libinterp/dldfcn/__delaunayn__.cc,
libinterp/dldfcn/__eigs__.cc, libinterp/dldfcn/__fltk_uigetfile__.cc,
libinterp/dldfcn/__glpk__.cc, libinterp/dldfcn/__init_fltk__.cc,
libinterp/dldfcn/__init_gnuplot__.cc, libinterp/dldfcn/__osmesa_print__.cc,
libinterp/dldfcn/__voronoi__.cc, libinterp/dldfcn/amd.cc,
libinterp/dldfcn/audiodevinfo.cc, libinterp/dldfcn/audioread.cc,
libinterp/dldfcn/ccolamd.cc, libinterp/dldfcn/chol.cc,
libinterp/dldfcn/colamd.cc, libinterp/dldfcn/convhulln.cc,
libinterp/dldfcn/dmperm.cc, libinterp/dldfcn/fftw.cc, libinterp/dldfcn/gzip.cc,
libinterp/dldfcn/oct-qhull.h, libinterp/dldfcn/qr.cc,
libinterp/dldfcn/symbfact.cc, libinterp/dldfcn/symrcm.cc, libinterp/gendoc.pl,
libinterp/genprops.awk, libinterp/liboctinterp-build-info.h,
libinterp/liboctinterp-build-info.in.cc, libinterp/mk-errno-list,
libinterp/mk-pkg-add, libinterp/mkops, libinterp/octave-value/ov-base-diag.cc,
libinterp/octave-value/ov-base-diag.h, libinterp/octave-value/ov-base-int.cc,
libinterp/octave-value/ov-base-int.h, libinterp/octave-value/ov-base-mat.cc,
libinterp/octave-value/ov-base-mat.h, libinterp/octave-value/ov-base-scalar.cc,
libinterp/octave-value/ov-base-scalar.h,
libinterp/octave-value/ov-base-sparse.cc,
libinterp/octave-value/ov-base-sparse.h, libinterp/octave-value/ov-base.cc,
libinterp/octave-value/ov-base.h, libinterp/octave-value/ov-bool-mat.cc,
libinterp/octave-value/ov-bool-mat.h, libinterp/octave-value/ov-bool-sparse.cc,
libinterp/octave-value/ov-bool-sparse.h, libinterp/octave-value/ov-bool.cc,
libinterp/octave-value/ov-bool.h, libinterp/octave-value/ov-builtin.cc,
libinterp/octave-value/ov-builtin.h, libinterp/octave-value/ov-cell.cc,
libinterp/octave-value/ov-cell.h, libinterp/octave-value/ov-ch-mat.cc,
libinterp/octave-value/ov-ch-mat.h, libinterp/octave-value/ov-class.cc,
libinterp/octave-value/ov-class.h, libinterp/octave-value/ov-classdef.cc,
libinterp/octave-value/ov-classdef.h, libinterp/octave-value/ov-colon.cc,
libinterp/octave-value/ov-colon.h, libinterp/octave-value/ov-complex.cc,
libinterp/octave-value/ov-complex.h, libinterp/octave-value/ov-cs-list.cc,
libinterp/octave-value/ov-cs-list.h, libinterp/octave-value/ov-cx-diag.cc,
libinterp/octave-value/ov-cx-diag.h, libinterp/octave-value/ov-cx-mat.cc,
libinterp/octave-value/ov-cx-mat.h, libinterp/octave-value/ov-cx-sparse.cc,
libinterp/octave-value/ov-cx-sparse.h, libinterp/octave-value/ov-dld-fcn.cc,
libinterp/octave-value/ov-dld-fcn.h, libinterp/octave-value/ov-fcn-handle.cc,
libinterp/octave-value/ov-fcn-handle.h,
libinterp/octave-value/ov-fcn-inline.cc,
libinterp/octave-value/ov-fcn-inline.h, libinterp/octave-value/ov-fcn.cc,
libinterp/octave-value/ov-fcn.h, libinterp/octave-value/ov-float.cc,
libinterp/octave-value/ov-float.h, libinterp/octave-value/ov-flt-complex.cc,
libinterp/octave-value/ov-flt-complex.h,
libinterp/octave-value/ov-flt-cx-diag.cc,
libinterp/octave-value/ov-flt-cx-diag.h,
libinterp/octave-value/ov-flt-cx-mat.cc,
libinterp/octave-value/ov-flt-cx-mat.h,
libinterp/octave-value/ov-flt-re-diag.cc,
libinterp/octave-value/ov-flt-re-diag.h,
libinterp/octave-value/ov-flt-re-mat.cc,
libinterp/octave-value/ov-flt-re-mat.h, libinterp/octave-value/ov-int-traits.h,
libinterp/octave-value/ov-int16.cc, libinterp/octave-value/ov-int16.h,
libinterp/octave-value/ov-int32.cc, libinterp/octave-value/ov-int32.h,
libinterp/octave-value/ov-int64.cc, libinterp/octave-value/ov-int64.h,
libinterp/octave-value/ov-int8.cc, libinterp/octave-value/ov-int8.h,
libinterp/octave-value/ov-intx.h, libinterp/octave-value/ov-java.cc,
libinterp/octave-value/ov-java.h, libinterp/octave-value/ov-lazy-idx.cc,
libinterp/octave-value/ov-lazy-idx.h, libinterp/octave-value/ov-mex-fcn.cc,
libinterp/octave-value/ov-mex-fcn.h, libinterp/octave-value/ov-null-mat.cc,
libinterp/octave-value/ov-null-mat.h, libinterp/octave-value/ov-oncleanup.cc,
libinterp/octave-value/ov-oncleanup.h, libinterp/octave-value/ov-perm.cc,
libinterp/octave-value/ov-perm.h, libinterp/octave-value/ov-range.cc,
libinterp/octave-value/ov-range.h, libinterp/octave-value/ov-re-diag.cc,
libinterp/octave-value/ov-re-diag.h, libinterp/octave-value/ov-re-mat.cc,
libinterp/octave-value/ov-re-mat.h, libinterp/octave-value/ov-re-sparse.cc,
libinterp/octave-value/ov-re-sparse.h, libinterp/octave-value/ov-scalar.cc,
libinterp/octave-value/ov-scalar.h, libinterp/octave-value/ov-str-mat.cc,
libinterp/octave-value/ov-str-mat.h, libinterp/octave-value/ov-struct.cc,
libinterp/octave-value/ov-struct.h, libinterp/octave-value/ov-typeinfo.cc,
libinterp/octave-value/ov-typeinfo.h, libinterp/octave-value/ov-uint16.cc,
libinterp/octave-value/ov-uint16.h, libinterp/octave-value/ov-uint32.cc,
libinterp/octave-value/ov-uint32.h, libinterp/octave-value/ov-uint64.cc,
libinterp/octave-value/ov-uint64.h, libinterp/octave-value/ov-uint8.cc,
libinterp/octave-value/ov-uint8.h, libinterp/octave-value/ov-usr-fcn.cc,
libinterp/octave-value/ov-usr-fcn.h, libinterp/octave-value/ov.cc,
libinterp/octave-value/ov.h, libinterp/octave-value/ovl.cc,
libinterp/octave-value/ovl.h, libinterp/octave.cc, libinterp/octave.h,
libinterp/op-kw-docs, libinterp/operators/op-b-b.cc,
libinterp/operators/op-b-bm.cc, libinterp/operators/op-b-sbm.cc,
libinterp/operators/op-bm-b.cc, libinterp/operators/op-bm-bm.cc,
libinterp/operators/op-bm-sbm.cc, libinterp/operators/op-cdm-cdm.cc,
libinterp/operators/op-cdm-cm.cc, libinterp/operators/op-cdm-cs.cc,
libinterp/operators/op-cdm-dm.cc, libinterp/operators/op-cdm-m.cc,
libinterp/operators/op-cdm-s.cc, libinterp/operators/op-cell.cc,
libinterp/operators/op-chm.cc, libinterp/operators/op-class.cc,
libinterp/operators/op-cm-cdm.cc, libinterp/operators/op-cm-cm.cc,
libinterp/operators/op-cm-cs.cc, libinterp/operators/op-cm-dm.cc,
libinterp/operators/op-cm-m.cc, libinterp/operators/op-cm-pm.cc,
libinterp/operators/op-cm-s.cc, libinterp/operators/op-cm-scm.cc,
libinterp/operators/op-cm-sm.cc, libinterp/operators/op-cs-cm.cc,
libinterp/operators/op-cs-cs.cc, libinterp/operators/op-cs-m.cc,
libinterp/operators/op-cs-s.cc, libinterp/operators/op-cs-scm.cc,
libinterp/operators/op-cs-sm.cc, libinterp/operators/op-dm-cdm.cc,
libinterp/operators/op-dm-cm.cc, libinterp/operators/op-dm-cs.cc,
libinterp/operators/op-dm-dm.cc, libinterp/operators/op-dm-m.cc,
libinterp/operators/op-dm-s.cc, libinterp/operators/op-dm-scm.cc,
libinterp/operators/op-dm-sm.cc, libinterp/operators/op-dm-template.cc,
libinterp/operators/op-dms-template.cc, libinterp/operators/op-fcdm-fcdm.cc,
libinterp/operators/op-fcdm-fcm.cc, libinterp/operators/op-fcdm-fcs.cc,
libinterp/operators/op-fcdm-fdm.cc, libinterp/operators/op-fcdm-fm.cc,
libinterp/operators/op-fcdm-fs.cc, libinterp/operators/op-fcm-fcdm.cc,
libinterp/operators/op-fcm-fcm.cc, libinterp/operators/op-fcm-fcs.cc,
libinterp/operators/op-fcm-fdm.cc, libinterp/operators/op-fcm-fm.cc,
libinterp/operators/op-fcm-fs.cc, libinterp/operators/op-fcm-pm.cc,
libinterp/operators/op-fcn.cc, libinterp/operators/op-fcs-fcm.cc,
libinterp/operators/op-fcs-fcs.cc, libinterp/operators/op-fcs-fm.cc,
libinterp/operators/op-fcs-fs.cc, libinterp/operators/op-fdm-fcdm.cc,
libinterp/operators/op-fdm-fcm.cc, libinterp/operators/op-fdm-fcs.cc,
libinterp/operators/op-fdm-fdm.cc, libinterp/operators/op-fdm-fm.cc,
libinterp/operators/op-fdm-fs.cc, libinterp/operators/op-fm-fcdm.cc,
libinterp/operators/op-fm-fcm.cc, libinterp/operators/op-fm-fcs.cc,
libinterp/operators/op-fm-fdm.cc, libinterp/operators/op-fm-fm.cc,
libinterp/operators/op-fm-fs.cc, libinterp/operators/op-fm-pm.cc,
libinterp/operators/op-fs-fcm.cc, libinterp/operators/op-fs-fcs.cc,
libinterp/operators/op-fs-fm.cc, libinterp/operators/op-fs-fs.cc,
libinterp/operators/op-i16-i16.cc, libinterp/operators/op-i32-i32.cc,
libinterp/operators/op-i64-i64.cc, libinterp/operators/op-i8-i8.cc,
libinterp/operators/op-int-concat.cc, libinterp/operators/op-int.h,
libinterp/operators/op-m-cdm.cc, libinterp/operators/op-m-cm.cc,
libinterp/operators/op-m-cs.cc, libinterp/operators/op-m-dm.cc,
libinterp/operators/op-m-m.cc, libinterp/operators/op-m-pm.cc,
libinterp/operators/op-m-s.cc, libinterp/operators/op-m-scm.cc,
libinterp/operators/op-m-sm.cc, libinterp/operators/op-pm-cm.cc,
libinterp/operators/op-pm-fcm.cc, libinterp/operators/op-pm-fm.cc,
libinterp/operators/op-pm-m.cc, libinterp/operators/op-pm-pm.cc,
libinterp/operators/op-pm-scm.cc, libinterp/operators/op-pm-sm.cc,
libinterp/operators/op-pm-template.cc, libinterp/operators/op-range.cc,
libinterp/operators/op-s-cm.cc, libinterp/operators/op-s-cs.cc,
libinterp/operators/op-s-m.cc, libinterp/operators/op-s-s.cc,
libinterp/operators/op-s-scm.cc, libinterp/operators/op-s-sm.cc,
libinterp/operators/op-sbm-b.cc, libinterp/operators/op-sbm-bm.cc,
libinterp/operators/op-sbm-sbm.cc, libinterp/operators/op-scm-cm.cc,
libinterp/operators/op-scm-cs.cc, libinterp/operators/op-scm-m.cc,
libinterp/operators/op-scm-s.cc, libinterp/operators/op-scm-scm.cc,
libinterp/operators/op-scm-sm.cc, libinterp/operators/op-sm-cm.cc,
libinterp/operators/op-sm-cs.cc, libinterp/operators/op-sm-m.cc,
libinterp/operators/op-sm-s.cc, libinterp/operators/op-sm-scm.cc,
libinterp/operators/op-sm-sm.cc, libinterp/operators/op-str-m.cc,
libinterp/operators/op-str-s.cc, libinterp/operators/op-str-str.cc,
libinterp/operators/op-struct.cc, libinterp/operators/op-ui16-ui16.cc,
libinterp/operators/op-ui32-ui32.cc, libinterp/operators/op-ui64-ui64.cc,
libinterp/operators/op-ui8-ui8.cc, libinterp/operators/ops.h,
libinterp/options-usage.h, libinterp/parse-tree/lex.h,
libinterp/parse-tree/lex.ll, libinterp/parse-tree/oct-parse.in.yy,
libinterp/parse-tree/octave.gperf, libinterp/parse-tree/parse.h,
libinterp/parse-tree/pt-all.h, libinterp/parse-tree/pt-arg-list.cc,
libinterp/parse-tree/pt-arg-list.h, libinterp/parse-tree/pt-array-list.cc,
libinterp/parse-tree/pt-array-list.h, libinterp/parse-tree/pt-assign.cc,
libinterp/parse-tree/pt-assign.h, libinterp/parse-tree/pt-binop.cc,
libinterp/parse-tree/pt-binop.h, libinterp/parse-tree/pt-bp.cc,
libinterp/parse-tree/pt-bp.h, libinterp/parse-tree/pt-cbinop.cc,
libinterp/parse-tree/pt-cbinop.h, libinterp/parse-tree/pt-cell.cc,
libinterp/parse-tree/pt-cell.h, libinterp/parse-tree/pt-check.cc,
libinterp/parse-tree/pt-check.h, libinterp/parse-tree/pt-classdef.cc,
libinterp/parse-tree/pt-classdef.h, libinterp/parse-tree/pt-cmd.cc,
libinterp/parse-tree/pt-cmd.h, libinterp/parse-tree/pt-colon.cc,
libinterp/parse-tree/pt-colon.h, libinterp/parse-tree/pt-const.cc,
libinterp/parse-tree/pt-const.h, libinterp/parse-tree/pt-decl.cc,
libinterp/parse-tree/pt-decl.h, libinterp/parse-tree/pt-eval.cc,
libinterp/parse-tree/pt-eval.h, libinterp/parse-tree/pt-except.cc,
libinterp/parse-tree/pt-except.h, libinterp/parse-tree/pt-exp.cc,
libinterp/parse-tree/pt-exp.h, libinterp/parse-tree/pt-fcn-handle.cc,
libinterp/parse-tree/pt-fcn-handle.h, libinterp/parse-tree/pt-funcall.cc,
libinterp/parse-tree/pt-funcall.h, libinterp/parse-tree/pt-id.cc,
libinterp/parse-tree/pt-id.h, libinterp/parse-tree/pt-idx.cc,
libinterp/parse-tree/pt-idx.h, libinterp/parse-tree/pt-jump.cc,
libinterp/parse-tree/pt-jump.h, libinterp/parse-tree/pt-loop.cc,
libinterp/parse-tree/pt-loop.h, libinterp/parse-tree/pt-mat.cc,
libinterp/parse-tree/pt-mat.h, libinterp/parse-tree/pt-misc.cc,
libinterp/parse-tree/pt-misc.h, libinterp/parse-tree/pt-pr-code.cc,
libinterp/parse-tree/pt-pr-code.h, libinterp/parse-tree/pt-select.cc,
libinterp/parse-tree/pt-select.h, libinterp/parse-tree/pt-stmt.cc,
libinterp/parse-tree/pt-stmt.h, libinterp/parse-tree/pt-unop.cc,
libinterp/parse-tree/pt-unop.h, libinterp/parse-tree/pt-walk.h,
libinterp/parse-tree/pt.cc, libinterp/parse-tree/pt.h,
libinterp/parse-tree/token.cc, libinterp/parse-tree/token.h,
libinterp/template-inst/Array-jit.cc, libinterp/template-inst/Array-tc.cc,
libinterp/version.cc, libinterp/version.in.h, liboctave/array/Array-C.cc,
liboctave/array/Array-b.cc, liboctave/array/Array-ch.cc,
liboctave/array/Array-d.cc, liboctave/array/Array-f.cc,
liboctave/array/Array-fC.cc, liboctave/array/Array-i.cc,
liboctave/array/Array-idx-vec.cc, liboctave/array/Array-s.cc,
liboctave/array/Array-str.cc, liboctave/array/Array-util.cc,
liboctave/array/Array-util.h, liboctave/array/Array-voidp.cc,
liboctave/array/Array.cc, liboctave/array/Array.h,
liboctave/array/CColVector.cc, liboctave/array/CColVector.h,
liboctave/array/CDiagMatrix.cc, liboctave/array/CDiagMatrix.h,
liboctave/array/CMatrix.cc, liboctave/array/CMatrix.h,
liboctave/array/CNDArray.cc, liboctave/array/CNDArray.h,
liboctave/array/CRowVector.cc, liboctave/array/CRowVector.h,
liboctave/array/CSparse.cc, liboctave/array/CSparse.h,
liboctave/array/DiagArray2.cc, liboctave/array/DiagArray2.h,
liboctave/array/MArray-C.cc, liboctave/array/MArray-d.cc,
liboctave/array/MArray-f.cc, liboctave/array/MArray-fC.cc,
liboctave/array/MArray-i.cc, liboctave/array/MArray-s.cc,
liboctave/array/MArray.cc, liboctave/array/MArray.h,
liboctave/array/MDiagArray2.cc, liboctave/array/MDiagArray2.h,
liboctave/array/MSparse-C.cc, liboctave/array/MSparse-d.cc,
liboctave/array/MSparse.cc, liboctave/array/MSparse.h,
liboctave/array/Matrix.h, liboctave/array/MatrixType.cc,
liboctave/array/MatrixType.h, liboctave/array/PermMatrix.cc,
liboctave/array/PermMatrix.h, liboctave/array/Range.cc,
liboctave/array/Range.h, liboctave/array/Sparse-C.cc,
liboctave/array/Sparse-b.cc, liboctave/array/Sparse-d.cc,
liboctave/array/Sparse.cc, liboctave/array/Sparse.h,
liboctave/array/boolMatrix.cc, liboctave/array/boolMatrix.h,
liboctave/array/boolNDArray.cc, liboctave/array/boolNDArray.h,
liboctave/array/boolSparse.cc, liboctave/array/boolSparse.h,
liboctave/array/chMatrix.cc, liboctave/array/chMatrix.h,
liboctave/array/chNDArray.cc, liboctave/array/chNDArray.h,
liboctave/array/dColVector.cc, liboctave/array/dColVector.h,
liboctave/array/dDiagMatrix.cc, liboctave/array/dDiagMatrix.h,
liboctave/array/dMatrix.cc, liboctave/array/dMatrix.h,
liboctave/array/dNDArray.cc, liboctave/array/dNDArray.h,
liboctave/array/dRowVector.cc, liboctave/array/dRowVector.h,
liboctave/array/dSparse.cc, liboctave/array/dSparse.h,
liboctave/array/dim-vector.cc, liboctave/array/dim-vector.h,
liboctave/array/fCColVector.cc, liboctave/array/fCColVector.h,
liboctave/array/fCDiagMatrix.cc, liboctave/array/fCDiagMatrix.h,
liboctave/array/fCMatrix.cc, liboctave/array/fCMatrix.h,
liboctave/array/fCNDArray.cc, liboctave/array/fCNDArray.h,
liboctave/array/fCRowVector.cc, liboctave/array/fCRowVector.h,
liboctave/array/fColVector.cc, liboctave/array/fColVector.h,
liboctave/array/fDiagMatrix.cc, liboctave/array/fDiagMatrix.h,
liboctave/array/fMatrix.cc, liboctave/array/fMatrix.h,
liboctave/array/fNDArray.cc, liboctave/array/fNDArray.h,
liboctave/array/fRowVector.cc, liboctave/array/fRowVector.h,
liboctave/array/idx-vector.cc, liboctave/array/idx-vector.h,
liboctave/array/int16NDArray.cc, liboctave/array/int16NDArray.h,
liboctave/array/int32NDArray.cc, liboctave/array/int32NDArray.h,
liboctave/array/int64NDArray.cc, liboctave/array/int64NDArray.h,
liboctave/array/int8NDArray.cc, liboctave/array/int8NDArray.h,
liboctave/array/intNDArray.cc, liboctave/array/intNDArray.h,
liboctave/array/uint16NDArray.cc, liboctave/array/uint16NDArray.h,
liboctave/array/uint32NDArray.cc, liboctave/array/uint32NDArray.h,
liboctave/array/uint64NDArray.cc, liboctave/array/uint64NDArray.h,
liboctave/array/uint8NDArray.cc, liboctave/array/uint8NDArray.h,
liboctave/cruft/misc/blaswrap.c, liboctave/cruft/misc/cquit.c,
liboctave/cruft/misc/f77-extern.cc, liboctave/cruft/misc/f77-fcn.c,
liboctave/cruft/misc/f77-fcn.h, liboctave/cruft/misc/lo-error.c,
liboctave/cruft/misc/lo-error.h, liboctave/cruft/misc/quit.cc,
liboctave/cruft/misc/quit.h, liboctave/liboctave-build-info.h,
liboctave/liboctave-build-info.in.cc, liboctave/numeric/CollocWt.cc,
liboctave/numeric/CollocWt.h, liboctave/numeric/DAE.h,
liboctave/numeric/DAEFunc.h, liboctave/numeric/DAERT.h,
liboctave/numeric/DAERTFunc.h, liboctave/numeric/DASPK-opts.in,
liboctave/numeric/DASPK.cc, liboctave/numeric/DASPK.h,
liboctave/numeric/DASRT-opts.in, liboctave/numeric/DASRT.cc,
liboctave/numeric/DASRT.h, liboctave/numeric/DASSL-opts.in,
liboctave/numeric/DASSL.cc, liboctave/numeric/DASSL.h, liboctave/numeric/DET.h,
liboctave/numeric/EIG.cc, liboctave/numeric/EIG.h,
liboctave/numeric/LSODE-opts.in, liboctave/numeric/LSODE.cc,
liboctave/numeric/LSODE.h, liboctave/numeric/ODE.h,
liboctave/numeric/ODEFunc.h, liboctave/numeric/ODES.cc,
liboctave/numeric/ODES.h, liboctave/numeric/ODESFunc.h,
liboctave/numeric/Quad-opts.in, liboctave/numeric/Quad.cc,
liboctave/numeric/Quad.h, liboctave/numeric/aepbalance.cc,
liboctave/numeric/aepbalance.h, liboctave/numeric/base-dae.h,
liboctave/numeric/base-de.h, liboctave/numeric/base-min.h,
liboctave/numeric/bsxfun-decl.h, liboctave/numeric/bsxfun-defs.cc,
liboctave/numeric/bsxfun.h, liboctave/numeric/chol.cc,
liboctave/numeric/chol.h, liboctave/numeric/eigs-base.cc,
liboctave/numeric/eigs-base.h, liboctave/numeric/fEIG.cc,
liboctave/numeric/fEIG.h, liboctave/numeric/gepbalance.cc,
liboctave/numeric/gepbalance.h, liboctave/numeric/gsvd.cc,
liboctave/numeric/gsvd.h, liboctave/numeric/hess.cc, liboctave/numeric/hess.h,
liboctave/numeric/lo-amos-proto.h, liboctave/numeric/lo-arpack-proto.h,
liboctave/numeric/lo-blas-proto.h, liboctave/numeric/lo-fftpack-proto.h,
liboctave/numeric/lo-lapack-proto.h, liboctave/numeric/lo-mappers.cc,
liboctave/numeric/lo-mappers.h, liboctave/numeric/lo-qrupdate-proto.h,
liboctave/numeric/lo-ranlib-proto.h, liboctave/numeric/lo-slatec-proto.h,
liboctave/numeric/lo-specfun.cc, liboctave/numeric/lo-specfun.h,
liboctave/numeric/lu.cc, liboctave/numeric/lu.h,
liboctave/numeric/oct-convn.cc, liboctave/numeric/oct-convn.h,
liboctave/numeric/oct-fftw.cc, liboctave/numeric/oct-fftw.h,
liboctave/numeric/oct-norm.cc, liboctave/numeric/oct-norm.h,
liboctave/numeric/oct-rand.cc, liboctave/numeric/oct-rand.h,
liboctave/numeric/oct-spparms.cc, liboctave/numeric/oct-spparms.h,
liboctave/numeric/qr.cc, liboctave/numeric/qr.h, liboctave/numeric/qrp.cc,
liboctave/numeric/qrp.h, liboctave/numeric/randgamma.cc,
liboctave/numeric/randgamma.h, liboctave/numeric/randmtzig.cc,
liboctave/numeric/randmtzig.h, liboctave/numeric/randpoisson.cc,
liboctave/numeric/randpoisson.h, liboctave/numeric/schur.cc,
liboctave/numeric/schur.h, liboctave/numeric/sparse-chol.cc,
liboctave/numeric/sparse-chol.h, liboctave/numeric/sparse-dmsolve.cc,
liboctave/numeric/sparse-dmsolve.h, liboctave/numeric/sparse-lu.cc,
liboctave/numeric/sparse-lu.h, liboctave/numeric/sparse-qr.cc,
liboctave/numeric/sparse-qr.h, liboctave/numeric/svd.cc,
liboctave/numeric/svd.h, liboctave/operators/Sparse-diag-op-defs.h,
liboctave/operators/Sparse-op-decls.h, liboctave/operators/Sparse-op-defs.h,
liboctave/operators/Sparse-perm-op-defs.h, liboctave/operators/mk-ops.awk,
liboctave/operators/mx-base.h, liboctave/operators/mx-defs.h,
liboctave/operators/mx-ext.h, liboctave/operators/mx-inlines.cc,
liboctave/operators/mx-op-decl.h, liboctave/operators/mx-op-defs.h,
liboctave/operators/mx-ops, liboctave/operators/smx-ops,
liboctave/operators/vx-ops, liboctave/system/child-list.cc,
liboctave/system/child-list.h, liboctave/system/dir-ops.cc,
liboctave/system/dir-ops.h, liboctave/system/file-ops.cc,
liboctave/system/file-ops.h, liboctave/system/file-stat.cc,
liboctave/system/file-stat.h, liboctave/system/lo-sysdep.cc,
liboctave/system/lo-sysdep.h, liboctave/system/mach-info.cc,
liboctave/system/mach-info.h, liboctave/system/oct-env.cc,
liboctave/system/oct-env.h, liboctave/system/oct-group.cc,
liboctave/system/oct-group.h, liboctave/system/oct-passwd.cc,
liboctave/system/oct-passwd.h, liboctave/system/oct-syscalls.cc,
liboctave/system/oct-syscalls.h, liboctave/system/oct-time.cc,
liboctave/system/oct-time.h, liboctave/system/oct-uname.cc,
liboctave/system/oct-uname.h, liboctave/util/action-container.h,
liboctave/util/base-list.h, liboctave/util/byte-swap.h,
liboctave/util/caseless-str.h, liboctave/util/cmd-edit.cc,
liboctave/util/cmd-edit.h, liboctave/util/cmd-hist.cc,
liboctave/util/cmd-hist.h, liboctave/util/data-conv.cc,
liboctave/util/data-conv.h, liboctave/util/f2c-main.c,
liboctave/util/functor.h, liboctave/util/glob-match.cc,
liboctave/util/glob-match.h, liboctave/util/kpse.cc, liboctave/util/kpse.h,
liboctave/util/lo-array-errwarn.cc, liboctave/util/lo-array-errwarn.h,
liboctave/util/lo-array-gripes.cc, liboctave/util/lo-array-gripes.h,
liboctave/util/lo-cutils.c, liboctave/util/lo-cutils.h,
liboctave/util/lo-hash.cc, liboctave/util/lo-hash.h, liboctave/util/lo-ieee.cc,
liboctave/util/lo-ieee.h, liboctave/util/lo-macros.h, liboctave/util/lo-math.h,
liboctave/util/lo-regexp.cc, liboctave/util/lo-regexp.h,
liboctave/util/lo-traits.h, liboctave/util/lo-utils.cc,
liboctave/util/lo-utils.h, liboctave/util/oct-alloc.h,
liboctave/util/oct-base64.cc, liboctave/util/oct-base64.h,
liboctave/util/oct-binmap.h, liboctave/util/oct-cmplx.h,
liboctave/util/oct-glob.cc, liboctave/util/oct-glob.h,
liboctave/util/oct-inttypes-fwd.h, liboctave/util/oct-inttypes.cc,
liboctave/util/oct-inttypes.h, liboctave/util/oct-locbuf.cc,
liboctave/util/oct-locbuf.h, liboctave/util/oct-mutex.cc,
liboctave/util/oct-mutex.h, liboctave/util/oct-refcount.h,
liboctave/util/oct-rl-edit.c, liboctave/util/oct-rl-edit.h,
liboctave/util/oct-rl-hist.c, liboctave/util/oct-rl-hist.h,
liboctave/util/oct-shlib.cc, liboctave/util/oct-shlib.h,
liboctave/util/oct-sort.cc, liboctave/util/oct-sort.h,
liboctave/util/oct-sparse.h, liboctave/util/oct-string.cc,
liboctave/util/oct-string.h, liboctave/util/pathsearch.cc,
liboctave/util/pathsearch.h, liboctave/util/singleton-cleanup.cc,
liboctave/util/sparse-sort.cc, liboctave/util/sparse-sort.h,
liboctave/util/sparse-util.cc, liboctave/util/sparse-util.h,
liboctave/util/str-vec.cc, liboctave/util/str-vec.h,
liboctave/util/sun-utils.h, liboctave/util/unwind-prot.cc,
liboctave/util/unwind-prot.h, liboctave/util/url-transfer.cc,
liboctave/util/url-transfer.h, liboctave/wrappers/areadlink-wrapper.c,
liboctave/wrappers/areadlink-wrapper.h,
liboctave/wrappers/async-system-wrapper.c,
liboctave/wrappers/async-system-wrapper.h,
liboctave/wrappers/base64-wrappers.c, liboctave/wrappers/base64-wrappers.h,
liboctave/wrappers/canonicalize-file-name-wrapper.c,
liboctave/wrappers/canonicalize-file-name-wrapper.h,
liboctave/wrappers/dirent-wrappers.c, liboctave/wrappers/dirent-wrappers.h,
liboctave/wrappers/fcntl-wrappers.c, liboctave/wrappers/fcntl-wrappers.h,
liboctave/wrappers/filepos-wrappers.c, liboctave/wrappers/filepos-wrappers.h,
liboctave/wrappers/fpucw-wrappers.c, liboctave/wrappers/fpucw-wrappers.h,
liboctave/wrappers/gen-tempname-wrapper.c,
liboctave/wrappers/gen-tempname-wrapper.h, liboctave/wrappers/getopt-wrapper.c,
liboctave/wrappers/getopt-wrapper.h, liboctave/wrappers/glob-wrappers.c,
liboctave/wrappers/glob-wrappers.h, liboctave/wrappers/hash-wrappers.c,
liboctave/wrappers/hash-wrappers.h, liboctave/wrappers/math-wrappers.c,
liboctave/wrappers/math-wrappers.h, liboctave/wrappers/mkostemp-wrapper.c,
liboctave/wrappers/mkostemp-wrapper.h, liboctave/wrappers/nanosleep-wrapper.c,
liboctave/wrappers/nanosleep-wrapper.h, liboctave/wrappers/nproc-wrapper.c,
liboctave/wrappers/nproc-wrapper.h, liboctave/wrappers/octave-popen2.c,
liboctave/wrappers/octave-popen2.h, liboctave/wrappers/putenv-wrapper.c,
liboctave/wrappers/putenv-wrapper.h,
liboctave/wrappers/set-program-name-wrapper.c,
liboctave/wrappers/set-program-name-wrapper.h,
liboctave/wrappers/signal-wrappers.c, liboctave/wrappers/signal-wrappers.h,
liboctave/wrappers/stat-wrappers.c, liboctave/wrappers/stat-wrappers.h,
liboctave/wrappers/strdup-wrapper.c, liboctave/wrappers/strdup-wrapper.h,
liboctave/wrappers/strftime-wrapper.c, liboctave/wrappers/strftime-wrapper.h,
liboctave/wrappers/strmode-wrapper.c, liboctave/wrappers/strmode-wrapper.h,
liboctave/wrappers/strptime-wrapper.c, liboctave/wrappers/strptime-wrapper.h,
liboctave/wrappers/time-wrappers.c, liboctave/wrappers/time-wrappers.h,
liboctave/wrappers/tmpfile-wrapper.c, liboctave/wrappers/tmpfile-wrapper.h,
liboctave/wrappers/uname-wrapper.c, liboctave/wrappers/uname-wrapper.h,
liboctave/wrappers/unistd-wrappers.c, liboctave/wrappers/unistd-wrappers.h,
liboctave/wrappers/unsetenv-wrapper.c, liboctave/wrappers/unsetenv-wrapper.h,
liboctave/wrappers/vasprintf-wrapper.c, liboctave/wrappers/vasprintf-wrapper.h,
liboctave/wrappers/wait-for-input.c, liboctave/wrappers/wait-for-input.h,
liboctave/wrappers/wait-wrappers.c, liboctave/wrappers/wait-wrappers.h,
m4/acinclude.m4, oct-conf-post.in.h, run-octave.in, scripts/@ftp/ascii.m,
scripts/@ftp/binary.m, scripts/@ftp/cd.m, scripts/@ftp/close.m,
scripts/@ftp/delete.m, scripts/@ftp/dir.m, scripts/@ftp/display.m,
scripts/@ftp/ftp.m, scripts/@ftp/loadobj.m, scripts/@ftp/mget.m,
scripts/@ftp/mkdir.m, scripts/@ftp/mput.m, scripts/@ftp/rename.m,
scripts/@ftp/rmdir.m, scripts/@ftp/saveobj.m,
scripts/audio/@audioplayer/__get_properties__.m,
scripts/audio/@audioplayer/audioplayer.m, scripts/audio/@audioplayer/display.m,
scripts/audio/@audioplayer/get.m, scripts/audio/@audioplayer/isplaying.m,
scripts/audio/@audioplayer/pause.m, scripts/audio/@audioplayer/play.m,
scripts/audio/@audioplayer/playblocking.m, scripts/audio/@audioplayer/resume.m,
scripts/audio/@audioplayer/set.m, scripts/audio/@audioplayer/stop.m,
scripts/audio/@audioplayer/subsasgn.m, scripts/audio/@audioplayer/subsref.m,
scripts/audio/@audiorecorder/__get_properties__.m,
scripts/audio/@audiorecorder/audiorecorder.m,
scripts/audio/@audiorecorder/display.m, scripts/audio/@audiorecorder/get.m,
scripts/audio/@audiorecorder/getaudiodata.m,
scripts/audio/@audiorecorder/getplayer.m,
scripts/audio/@audiorecorder/isrecording.m,
scripts/audio/@audiorecorder/pause.m, scripts/audio/@audiorecorder/play.m,
scripts/audio/@audiorecorder/record.m,
scripts/audio/@audiorecorder/recordblocking.m,
scripts/audio/@audiorecorder/resume.m, scripts/audio/@audiorecorder/set.m,
scripts/audio/@audiorecorder/stop.m, scripts/audio/@audiorecorder/subsasgn.m,
scripts/audio/@audiorecorder/subsref.m, scripts/audio/lin2mu.m,
scripts/audio/mu2lin.m, scripts/audio/record.m, scripts/audio/sound.m,
scripts/audio/soundsc.m, scripts/deprecated/bitmax.m,
scripts/deprecated/comma.m, scripts/deprecated/isstr.m,
scripts/deprecated/mahalanobis.m, scripts/deprecated/md5sum.m,
scripts/deprecated/octave_config_info.m, scripts/deprecated/onenormest.m,
scripts/deprecated/paren.m, scripts/deprecated/semicolon.m,
scripts/deprecated/sleep.m, scripts/deprecated/usleep.m,
scripts/deprecated/wavread.m, scripts/deprecated/wavwrite.m,
scripts/elfun/acosd.m, scripts/elfun/acot.m, scripts/elfun/acotd.m,
scripts/elfun/acoth.m, scripts/elfun/acsc.m, scripts/elfun/acscd.m,
scripts/elfun/acsch.m, scripts/elfun/asec.m, scripts/elfun/asecd.m,
scripts/elfun/asech.m, scripts/elfun/asind.m, scripts/elfun/atan2d.m,
scripts/elfun/atand.m, scripts/elfun/cosd.m, scripts/elfun/cot.m,
scripts/elfun/cotd.m, scripts/elfun/coth.m, scripts/elfun/csc.m,
scripts/elfun/cscd.m, scripts/elfun/csch.m, scripts/elfun/sec.m,
scripts/elfun/secd.m, scripts/elfun/sech.m, scripts/elfun/sind.m,
scripts/elfun/tand.m, scripts/general/accumarray.m, scripts/general/accumdim.m,
scripts/general/bincoeff.m, scripts/general/bitcmp.m, scripts/general/bitget.m,
scripts/general/bitset.m, scripts/general/blkdiag.m,
scripts/general/cart2pol.m, scripts/general/cart2sph.m,
scripts/general/cell2mat.m, scripts/general/celldisp.m, scripts/general/chop.m,
scripts/general/circshift.m, scripts/general/common_size.m,
scripts/general/cplxpair.m, scripts/general/cumtrapz.m, scripts/general/curl.m,
scripts/general/dblquad.m, scripts/general/deal.m, scripts/general/deg2rad.m,
scripts/general/del2.m, scripts/general/display.m,
scripts/general/divergence.m, scripts/general/fieldnames.m,
scripts/general/flip.m, scripts/general/flipdim.m, scripts/general/fliplr.m,
scripts/general/flipud.m, scripts/general/grabcode.m,
scripts/general/gradient.m, scripts/general/idivide.m,
scripts/general/inputParser.m, scripts/general/int2str.m,
scripts/general/interp1.m, scripts/general/interp2.m,
scripts/general/interp3.m, scripts/general/interpft.m,
scripts/general/interpn.m, scripts/general/isdir.m, scripts/general/isequal.m,
scripts/general/isequaln.m, scripts/general/loadobj.m,
scripts/general/logspace.m, scripts/general/methods.m,
scripts/general/nargchk.m, scripts/general/narginchk.m,
scripts/general/nargoutchk.m, scripts/general/nextpow2.m,
scripts/general/nthargout.m, scripts/general/num2str.m,
scripts/general/pol2cart.m, scripts/general/polyarea.m,
scripts/general/postpad.m, scripts/general/prepad.m,
scripts/general/private/__isequal__.m, scripts/general/private/__splinen__.m,
scripts/general/publish.m, scripts/general/quadgk.m, scripts/general/quadl.m,
scripts/general/quadv.m, scripts/general/rad2deg.m, scripts/general/randi.m,
scripts/general/rat.m, scripts/general/repmat.m, scripts/general/rot90.m,
scripts/general/rotdim.m, scripts/general/saveobj.m, scripts/general/shift.m,
scripts/general/shiftdim.m, scripts/general/sortrows.m,
scripts/general/sph2cart.m, scripts/general/structfun.m,
scripts/general/subsindex.m, scripts/general/trapz.m,
scripts/general/triplequad.m, scripts/general/validateattributes.m,
scripts/geometry/convhull.m, scripts/geometry/delaunay.m,
scripts/geometry/delaunayn.m, scripts/geometry/dsearch.m,
scripts/geometry/dsearchn.m, scripts/geometry/griddata.m,
scripts/geometry/griddata3.m, scripts/geometry/griddatan.m,
scripts/geometry/inpolygon.m, scripts/geometry/rectint.m,
scripts/geometry/tsearchn.m, scripts/geometry/voronoi.m,
scripts/geometry/voronoin.m, scripts/gui/dialog.m, scripts/gui/errordlg.m,
scripts/gui/guidata.m, scripts/gui/guihandles.m, scripts/gui/helpdlg.m,
scripts/gui/inputdlg.m, scripts/gui/listdlg.m, scripts/gui/msgbox.m,
scripts/gui/private/__file_filter__.m,
scripts/gui/private/__fltk_file_filter__.m,
scripts/gui/private/__get_funcname__.m, scripts/gui/private/__is_function__.m,
scripts/gui/private/__uigetdir_fltk__.m,
scripts/gui/private/__uigetfile_fltk__.m,
scripts/gui/private/__uiobject_split_args__.m,
scripts/gui/private/__uiputfile_fltk__.m, scripts/gui/questdlg.m,
scripts/gui/uibuttongroup.m, scripts/gui/uicontextmenu.m,
scripts/gui/uicontrol.m, scripts/gui/uigetdir.m, scripts/gui/uigetfile.m,
scripts/gui/uimenu.m, scripts/gui/uipanel.m, scripts/gui/uipushtool.m,
scripts/gui/uiputfile.m, scripts/gui/uiresume.m, scripts/gui/uitoggletool.m,
scripts/gui/uitoolbar.m, scripts/gui/uiwait.m, scripts/gui/waitbar.m,
scripts/gui/waitforbuttonpress.m, scripts/gui/warndlg.m,
scripts/help/__gripe_missing_component__.m, scripts/help/__makeinfo__.m,
scripts/help/__unimplemented__.m, scripts/help/ans.m, scripts/help/doc.m,
scripts/help/doc_cache_create.m, scripts/help/error_ids.m,
scripts/help/get_first_help_sentence.m, scripts/help/help.m,
scripts/help/lookfor.m, scripts/help/print_usage.m,
scripts/help/private/__additional_help_message__.m,
scripts/help/private/__strip_html_tags__.m, scripts/help/type.m,
scripts/help/warning_ids.m, scripts/help/which.m, scripts/image/autumn.m,
scripts/image/bone.m, scripts/image/brighten.m, scripts/image/cmpermute.m,
scripts/image/cmunique.m, scripts/image/colorcube.m, scripts/image/colormap.m,
scripts/image/contrast.m, scripts/image/cool.m, scripts/image/copper.m,
scripts/image/cubehelix.m, scripts/image/flag.m, scripts/image/gray.m,
scripts/image/gray2ind.m, scripts/image/hot.m, scripts/image/hsv.m,
scripts/image/hsv2rgb.m, scripts/image/im2double.m, scripts/image/image.m,
scripts/image/imagesc.m, scripts/image/imfinfo.m, scripts/image/imformats.m,
scripts/image/imread.m, scripts/image/imshow.m, scripts/image/imwrite.m,
scripts/image/ind2gray.m, scripts/image/ind2rgb.m, scripts/image/iscolormap.m,
scripts/image/jet.m, scripts/image/lines.m, scripts/image/ntsc2rgb.m,
scripts/image/ocean.m, scripts/image/pink.m, scripts/image/prism.m,
scripts/image/private/__imfinfo__.m, scripts/image/private/__imread__.m,
scripts/image/private/__imwrite__.m,
scripts/image/private/colorspace_conversion_input_check.m,
scripts/image/private/colorspace_conversion_revert.m,
scripts/image/private/imageIO.m, scripts/image/private/imwrite_filename.m,
scripts/image/private/ind2x.m, scripts/image/rainbow.m,
scripts/image/rgb2hsv.m, scripts/image/rgb2ind.m, scripts/image/rgb2ntsc.m,
scripts/image/rgbplot.m, scripts/image/spinmap.m, scripts/image/spring.m,
scripts/image/summer.m, scripts/image/viridis.m, scripts/image/white.m,
scripts/image/winter.m, scripts/io/beep.m, scripts/io/csvread.m,
scripts/io/csvwrite.m, scripts/io/dlmwrite.m, scripts/io/fileread.m,
scripts/io/importdata.m, scripts/io/is_valid_file_id.m, scripts/io/strread.m,
scripts/io/textread.m, scripts/java/javaArray.m, scripts/java/java_get.m,
scripts/java/java_set.m, scripts/java/javaaddpath.m, scripts/java/javachk.m,
scripts/java/javaclasspath.m, scripts/java/javamem.m,
scripts/java/javarmpath.m, scripts/java/org/octave/ClassHelper.java,
scripts/java/org/octave/Matrix.java,
scripts/java/org/octave/OctClassLoader.java,
scripts/java/org/octave/Octave.java,
scripts/java/org/octave/OctaveReference.java, scripts/java/usejava.m,
scripts/linear-algebra/bandwidth.m,
scripts/linear-algebra/commutation_matrix.m, scripts/linear-algebra/cond.m,
scripts/linear-algebra/condeig.m, scripts/linear-algebra/condest.m,
scripts/linear-algebra/cross.m, scripts/linear-algebra/duplication_matrix.m,
scripts/linear-algebra/expm.m, scripts/linear-algebra/housh.m,
scripts/linear-algebra/isbanded.m, scripts/linear-algebra/isdefinite.m,
scripts/linear-algebra/isdiag.m, scripts/linear-algebra/ishermitian.m,
scripts/linear-algebra/issymmetric.m, scripts/linear-algebra/istril.m,
scripts/linear-algebra/istriu.m, scripts/linear-algebra/krylov.m,
scripts/linear-algebra/linsolve.m, scripts/linear-algebra/logm.m,
scripts/linear-algebra/normest.m, scripts/linear-algebra/normest1.m,
scripts/linear-algebra/null.m, scripts/linear-algebra/orth.m,
scripts/linear-algebra/planerot.m, scripts/linear-algebra/qzhess.m,
scripts/linear-algebra/rank.m, scripts/linear-algebra/rref.m,
scripts/linear-algebra/subspace.m, scripts/linear-algebra/trace.m,
scripts/linear-algebra/vech.m, scripts/miscellaneous/bug_report.m,
scripts/miscellaneous/bunzip2.m, scripts/miscellaneous/cast.m,
scripts/miscellaneous/citation.m, scripts/miscellaneous/compare_versions.m,
scripts/miscellaneous/computer.m, scripts/miscellaneous/copyfile.m,
scripts/miscellaneous/debug.m, scripts/miscellaneous/delete.m,
scripts/miscellaneous/desktop.m, scripts/miscellaneous/dir.m,
scripts/miscellaneous/dos.m, scripts/miscellaneous/edit.m,
scripts/miscellaneous/fact.m, scripts/miscellaneous/fileattrib.m,
scripts/miscellaneous/fileparts.m, scripts/miscellaneous/fullfile.m,
scripts/miscellaneous/genvarname.m, scripts/miscellaneous/getappdata.m,
scripts/miscellaneous/getfield.m, scripts/miscellaneous/gunzip.m,
scripts/miscellaneous/info.m, scripts/miscellaneous/inputname.m,
scripts/miscellaneous/isappdata.m, scripts/miscellaneous/isdeployed.m,
scripts/miscellaneous/ismac.m, scripts/miscellaneous/ispc.m,
scripts/miscellaneous/isunix.m, scripts/miscellaneous/license.m,
scripts/miscellaneous/list_primes.m, scripts/miscellaneous/ls.m,
scripts/miscellaneous/ls_command.m, scripts/miscellaneous/menu.m,
scripts/miscellaneous/mex.m, scripts/miscellaneous/mexext.m,
scripts/miscellaneous/mkdir.m, scripts/miscellaneous/mkoctfile.m,
scripts/miscellaneous/movefile.m, scripts/miscellaneous/namelengthmax.m,
scripts/miscellaneous/news.m, scripts/miscellaneous/open.m,
scripts/miscellaneous/orderfields.m, scripts/miscellaneous/pack.m,
scripts/miscellaneous/parseparams.m, scripts/miscellaneous/perl.m,
scripts/miscellaneous/private/__w2mpth__.m,
scripts/miscellaneous/private/display_info_file.m,
scripts/miscellaneous/python.m, scripts/miscellaneous/recycle.m,
scripts/miscellaneous/rmappdata.m, scripts/miscellaneous/run.m,
scripts/miscellaneous/setappdata.m, scripts/miscellaneous/setfield.m,
scripts/miscellaneous/substruct.m, scripts/miscellaneous/swapbytes.m,
scripts/miscellaneous/symvar.m, scripts/miscellaneous/tar.m,
scripts/miscellaneous/tempdir.m, scripts/miscellaneous/tmpnam.m,
scripts/miscellaneous/unix.m, scripts/miscellaneous/unpack.m,
scripts/miscellaneous/untar.m, scripts/miscellaneous/unzip.m,
scripts/miscellaneous/ver.m, scripts/miscellaneous/version.m,
scripts/miscellaneous/what.m, scripts/miscellaneous/xor.m,
scripts/miscellaneous/zip.m, scripts/mk-pkg-add, scripts/mkdoc.pl,
scripts/ode/ode23.m, scripts/ode/ode45.m, scripts/ode/odeget.m,
scripts/ode/odeplot.m, scripts/ode/odeset.m, scripts/ode/private/AbsRel_norm.m,
scripts/ode/private/integrate_adaptive.m, scripts/ode/private/kahan.m,
scripts/ode/private/ode_event_handler.m, scripts/ode/private/odedefaults.m,
scripts/ode/private/odemergeopts.m, scripts/ode/private/runge_kutta_23.m,
scripts/ode/private/runge_kutta_45_dorpri.m,
scripts/ode/private/runge_kutta_interpolate.m,
scripts/ode/private/starting_stepsize.m, scripts/optimization/__all_opts__.m,
scripts/optimization/fminbnd.m, scripts/optimization/fminsearch.m,
scripts/optimization/fminunc.m, scripts/optimization/fsolve.m,
scripts/optimization/fzero.m, scripts/optimization/glpk.m,
scripts/optimization/lsqnonneg.m, scripts/optimization/optimget.m,
scripts/optimization/optimset.m, scripts/optimization/pqpnonneg.m,
scripts/optimization/private/__fdjac__.m, scripts/optimization/qp.m,
scripts/optimization/sqp.m, scripts/path/matlabroot.m, scripts/path/pathdef.m,
scripts/path/private/getsavepath.m, scripts/path/savepath.m, scripts/pkg/pkg.m,
scripts/pkg/private/build.m, scripts/pkg/private/configure_make.m,
scripts/pkg/private/default_prefix.m, scripts/pkg/private/describe.m,
scripts/pkg/private/dirempty.m, scripts/pkg/private/get_description.m,
scripts/pkg/private/get_forge_download.m, scripts/pkg/private/get_forge_pkg.m,
scripts/pkg/private/get_unsatisfied_deps.m, scripts/pkg/private/getarch.m,
scripts/pkg/private/getarchdir.m, scripts/pkg/private/install.m,
scripts/pkg/private/installed_packages.m,
scripts/pkg/private/list_forge_packages.m, scripts/pkg/private/load_packages.m,
scripts/pkg/private/load_packages_and_dependencies.m,
scripts/pkg/private/rebuild.m, scripts/pkg/private/save_order.m,
scripts/pkg/private/uninstall.m, scripts/pkg/private/unload_packages.m,
scripts/plot/appearance/__clabel__.m,
scripts/plot/appearance/__getlegenddata__.m,
scripts/plot/appearance/annotation.m, scripts/plot/appearance/axis.m,
scripts/plot/appearance/box.m, scripts/plot/appearance/caxis.m,
scripts/plot/appearance/clabel.m, scripts/plot/appearance/daspect.m,
scripts/plot/appearance/datetick.m, scripts/plot/appearance/diffuse.m,
scripts/plot/appearance/grid.m, scripts/plot/appearance/gtext.m,
scripts/plot/appearance/hidden.m, scripts/plot/appearance/legend.m,
scripts/plot/appearance/lighting.m, scripts/plot/appearance/material.m,
scripts/plot/appearance/orient.m, scripts/plot/appearance/pbaspect.m,
scripts/plot/appearance/private/__axis_label__.m,
scripts/plot/appearance/private/__axis_limits__.m,
scripts/plot/appearance/shading.m, scripts/plot/appearance/specular.m,
scripts/plot/appearance/text.m, scripts/plot/appearance/title.m,
scripts/plot/appearance/view.m, scripts/plot/appearance/whitebg.m,
scripts/plot/appearance/xlabel.m, scripts/plot/appearance/xlim.m,
scripts/plot/appearance/ylabel.m, scripts/plot/appearance/ylim.m,
scripts/plot/appearance/zlabel.m, scripts/plot/appearance/zlim.m,
scripts/plot/draw/area.m, scripts/plot/draw/bar.m, scripts/plot/draw/barh.m,
scripts/plot/draw/camlight.m, scripts/plot/draw/colorbar.m,
scripts/plot/draw/comet.m, scripts/plot/draw/comet3.m,
scripts/plot/draw/compass.m, scripts/plot/draw/contour.m,
scripts/plot/draw/contour3.m, scripts/plot/draw/contourc.m,
scripts/plot/draw/contourf.m, scripts/plot/draw/cylinder.m,
scripts/plot/draw/ellipsoid.m, scripts/plot/draw/errorbar.m,
scripts/plot/draw/ezcontour.m, scripts/plot/draw/ezcontourf.m,
scripts/plot/draw/ezmesh.m, scripts/plot/draw/ezmeshc.m,
scripts/plot/draw/ezplot.m, scripts/plot/draw/ezplot3.m,
scripts/plot/draw/ezpolar.m, scripts/plot/draw/ezsurf.m,
scripts/plot/draw/ezsurfc.m, scripts/plot/draw/feather.m,
scripts/plot/draw/fill.m, scripts/plot/draw/fplot.m, scripts/plot/draw/hist.m,
scripts/plot/draw/isocaps.m, scripts/plot/draw/isocolors.m,
scripts/plot/draw/isonormals.m, scripts/plot/draw/isosurface.m,
scripts/plot/draw/light.m, scripts/plot/draw/line.m,
scripts/plot/draw/loglog.m, scripts/plot/draw/loglogerr.m,
scripts/plot/draw/mesh.m, scripts/plot/draw/meshc.m, scripts/plot/draw/meshz.m,
scripts/plot/draw/pareto.m, scripts/plot/draw/patch.m,
scripts/plot/draw/pcolor.m, scripts/plot/draw/peaks.m, scripts/plot/draw/pie.m,
scripts/plot/draw/pie3.m, scripts/plot/draw/plot.m, scripts/plot/draw/plot3.m,
scripts/plot/draw/plotmatrix.m, scripts/plot/draw/plotyy.m,
scripts/plot/draw/polar.m, scripts/plot/draw/private/__add_datasource__.m,
scripts/plot/draw/private/__bar__.m,
scripts/plot/draw/private/__calc_isovalue_from_data__.m,
scripts/plot/draw/private/__contour__.m,
scripts/plot/draw/private/__errplot__.m,
scripts/plot/draw/private/__ezplot__.m,
scripts/plot/draw/private/__interp_cube__.m,
scripts/plot/draw/private/__line__.m,
scripts/plot/draw/private/__marching_cube__.m,
scripts/plot/draw/private/__patch__.m, scripts/plot/draw/private/__pie__.m,
scripts/plot/draw/private/__plt__.m, scripts/plot/draw/private/__quiver__.m,
scripts/plot/draw/private/__rotate_around_axis__.m,
scripts/plot/draw/private/__scatter__.m, scripts/plot/draw/private/__stem__.m,
scripts/plot/draw/private/__unite_shared_vertices__.m,
scripts/plot/draw/quiver.m, scripts/plot/draw/quiver3.m,
scripts/plot/draw/rectangle.m, scripts/plot/draw/reducepatch.m,
scripts/plot/draw/reducevolume.m, scripts/plot/draw/ribbon.m,
scripts/plot/draw/rose.m, scripts/plot/draw/scatter.m,
scripts/plot/draw/scatter3.m, scripts/plot/draw/semilogx.m,
scripts/plot/draw/semilogxerr.m, scripts/plot/draw/semilogy.m,
scripts/plot/draw/semilogyerr.m, scripts/plot/draw/shrinkfaces.m,
scripts/plot/draw/slice.m, scripts/plot/draw/smooth3.m,
scripts/plot/draw/sombrero.m, scripts/plot/draw/sphere.m,
scripts/plot/draw/stairs.m, scripts/plot/draw/stem.m,
scripts/plot/draw/stem3.m, scripts/plot/draw/stemleaf.m,
scripts/plot/draw/surf.m, scripts/plot/draw/surface.m,
scripts/plot/draw/surfc.m, scripts/plot/draw/surfl.m,
scripts/plot/draw/surfnorm.m, scripts/plot/draw/tetramesh.m,
scripts/plot/draw/trimesh.m, scripts/plot/draw/triplot.m,
scripts/plot/draw/trisurf.m, scripts/plot/draw/waterfall.m,
scripts/plot/util/__actual_axis_position__.m,
scripts/plot/util/__default_plot_options__.m,
scripts/plot/util/__gnuplot_drawnow__.m,
scripts/plot/util/__next_line_color__.m,
scripts/plot/util/__next_line_style__.m, scripts/plot/util/__opengl_info__.m,
scripts/plot/util/__plt_get_axis_arg__.m, scripts/plot/util/__pltopt__.m,
scripts/plot/util/allchild.m, scripts/plot/util/ancestor.m,
scripts/plot/util/axes.m, scripts/plot/util/cla.m, scripts/plot/util/clf.m,
scripts/plot/util/close.m, scripts/plot/util/closereq.m,
scripts/plot/util/colstyle.m, scripts/plot/util/copyobj.m,
scripts/plot/util/figure.m, scripts/plot/util/findall.m,
scripts/plot/util/findfigs.m, scripts/plot/util/findobj.m,
scripts/plot/util/frame2im.m, scripts/plot/util/gca.m,
scripts/plot/util/gcbf.m, scripts/plot/util/gcbo.m, scripts/plot/util/gcf.m,
scripts/plot/util/gco.m, scripts/plot/util/ginput.m,
scripts/plot/util/gnuplot_binary.in.m, scripts/plot/util/graphics_toolkit.m,
scripts/plot/util/hdl2struct.m, scripts/plot/util/hggroup.m,
scripts/plot/util/hgload.m, scripts/plot/util/hgsave.m,
scripts/plot/util/hold.m, scripts/plot/util/im2frame.m,
scripts/plot/util/isaxes.m, scripts/plot/util/isfigure.m,
scripts/plot/util/ishghandle.m, scripts/plot/util/ishold.m,
scripts/plot/util/isprop.m, scripts/plot/util/linkaxes.m,
scripts/plot/util/linkprop.m, scripts/plot/util/meshgrid.m,
scripts/plot/util/ndgrid.m, scripts/plot/util/newplot.m,
scripts/plot/util/pan.m, scripts/plot/util/print.m, scripts/plot/util/printd.m,
scripts/plot/util/private/__add_default_menu__.m,
scripts/plot/util/private/__ghostscript__.m,
scripts/plot/util/private/__gnuplot_draw_axes__.m,
scripts/plot/util/private/__gnuplot_draw_figure__.m,
scripts/plot/util/private/__gnuplot_get_var__.m,
scripts/plot/util/private/__gnuplot_ginput__.m,
scripts/plot/util/private/__gnuplot_has_feature__.m,
scripts/plot/util/private/__gnuplot_has_terminal__.m,
scripts/plot/util/private/__gnuplot_open_stream__.m,
scripts/plot/util/private/__gnuplot_print__.m,
scripts/plot/util/private/__gnuplot_version__.m,
scripts/plot/util/private/__opengl_print__.m,
scripts/plot/util/private/__print_parse_opts__.m, scripts/plot/util/refresh.m,
scripts/plot/util/refreshdata.m, scripts/plot/util/rotate.m,
scripts/plot/util/rotate3d.m, scripts/plot/util/saveas.m,
scripts/plot/util/shg.m, scripts/plot/util/struct2hdl.m,
scripts/plot/util/subplot.m, scripts/plot/util/zoom.m,
scripts/polynomial/compan.m, scripts/polynomial/conv.m,
scripts/polynomial/deconv.m, scripts/polynomial/mkpp.m,
scripts/polynomial/mpoles.m, scripts/polynomial/padecoef.m,
scripts/polynomial/pchip.m, scripts/polynomial/poly.m,
scripts/polynomial/polyaffine.m, scripts/polynomial/polyder.m,
scripts/polynomial/polyeig.m, scripts/polynomial/polyfit.m,
scripts/polynomial/polygcd.m, scripts/polynomial/polyint.m,
scripts/polynomial/polyout.m, scripts/polynomial/polyreduce.m,
scripts/polynomial/polyval.m, scripts/polynomial/polyvalm.m,
scripts/polynomial/ppder.m, scripts/polynomial/ppint.m,
scripts/polynomial/ppjumps.m, scripts/polynomial/ppval.m,
scripts/polynomial/residue.m, scripts/polynomial/roots.m,
scripts/polynomial/spline.m, scripts/polynomial/splinefit.m,
scripts/polynomial/unmkpp.m, scripts/prefs/addpref.m, scripts/prefs/getpref.m,
scripts/prefs/ispref.m, scripts/prefs/prefdir.m, scripts/prefs/preferences.m,
scripts/prefs/private/loadprefs.m, scripts/prefs/private/prefsfile.m,
scripts/prefs/private/saveprefs.m, scripts/prefs/rmpref.m,
scripts/prefs/setpref.m, scripts/profiler/html/style.css,
scripts/profiler/profexplore.m, scripts/profiler/profexport.m,
scripts/profiler/profile.m, scripts/profiler/profshow.m,
scripts/set/intersect.m, scripts/set/ismember.m, scripts/set/powerset.m,
scripts/set/private/validsetargs.m, scripts/set/setdiff.m,
scripts/set/setxor.m, scripts/set/union.m, scripts/set/unique.m,
scripts/signal/arch_fit.m, scripts/signal/arch_rnd.m,
scripts/signal/arch_test.m, scripts/signal/arma_rnd.m,
scripts/signal/autoreg_matrix.m, scripts/signal/bartlett.m,
scripts/signal/blackman.m, scripts/signal/detrend.m, scripts/signal/diffpara.m,
scripts/signal/durbinlevinson.m, scripts/signal/fftconv.m,
scripts/signal/fftfilt.m, scripts/signal/fftshift.m, scripts/signal/filter2.m,
scripts/signal/fractdiff.m, scripts/signal/freqz.m,
scripts/signal/freqz_plot.m, scripts/signal/hamming.m,
scripts/signal/hanning.m, scripts/signal/hurst.m, scripts/signal/ifftshift.m,
scripts/signal/periodogram.m, scripts/signal/private/rectangle_lw.m,
scripts/signal/private/rectangle_sw.m, scripts/signal/private/triangle_lw.m,
scripts/signal/private/triangle_sw.m, scripts/signal/sinc.m,
scripts/signal/sinetone.m, scripts/signal/sinewave.m,
scripts/signal/spectral_adf.m, scripts/signal/spectral_xdf.m,
scripts/signal/spencer.m, scripts/signal/stft.m, scripts/signal/synthesis.m,
scripts/signal/unwrap.m, scripts/signal/yulewalker.m, scripts/sparse/bicg.m,
scripts/sparse/bicgstab.m, scripts/sparse/cgs.m, scripts/sparse/colperm.m,
scripts/sparse/eigs.m, scripts/sparse/etreeplot.m, scripts/sparse/gmres.m,
scripts/sparse/gplot.m, scripts/sparse/ichol.m, scripts/sparse/ilu.m,
scripts/sparse/nonzeros.m, scripts/sparse/pcg.m, scripts/sparse/pcr.m,
scripts/sparse/private/__sprand__.m, scripts/sparse/qmr.m,
scripts/sparse/spaugment.m, scripts/sparse/spconvert.m,
scripts/sparse/spdiags.m, scripts/sparse/speye.m, scripts/sparse/spfun.m,
scripts/sparse/spones.m, scripts/sparse/sprand.m, scripts/sparse/sprandn.m,
scripts/sparse/sprandsym.m, scripts/sparse/spstats.m, scripts/sparse/spy.m,
scripts/sparse/svds.m, scripts/sparse/treelayout.m, scripts/sparse/treeplot.m,
scripts/specfun/bessel.m, scripts/specfun/beta.m, scripts/specfun/betaln.m,
scripts/specfun/ellipke.m, scripts/specfun/expint.m, scripts/specfun/factor.m,
scripts/specfun/factorial.m, scripts/specfun/isprime.m, scripts/specfun/lcm.m,
scripts/specfun/legendre.m, scripts/specfun/nchoosek.m,
scripts/specfun/nthroot.m, scripts/specfun/perms.m, scripts/specfun/pow2.m,
scripts/specfun/primes.m, scripts/specfun/reallog.m, scripts/specfun/realpow.m,
scripts/specfun/realsqrt.m, scripts/special-matrix/gallery.m,
scripts/special-matrix/hadamard.m, scripts/special-matrix/hankel.m,
scripts/special-matrix/hilb.m, scripts/special-matrix/invhilb.m,
scripts/special-matrix/magic.m, scripts/special-matrix/pascal.m,
scripts/special-matrix/rosser.m, scripts/special-matrix/toeplitz.m,
scripts/special-matrix/vander.m, scripts/special-matrix/wilkinson.m,
scripts/startup/__finish__.m, scripts/statistics/base/center.m,
scripts/statistics/base/cloglog.m, scripts/statistics/base/corr.m,
scripts/statistics/base/cov.m, scripts/statistics/base/gls.m,
scripts/statistics/base/histc.m, scripts/statistics/base/iqr.m,
scripts/statistics/base/kendall.m, scripts/statistics/base/kurtosis.m,
scripts/statistics/base/logit.m, scripts/statistics/base/lscov.m,
scripts/statistics/base/mean.m, scripts/statistics/base/meansq.m,
scripts/statistics/base/median.m, scripts/statistics/base/mode.m,
scripts/statistics/base/moment.m, scripts/statistics/base/ols.m,
scripts/statistics/base/ppplot.m, scripts/statistics/base/prctile.m,
scripts/statistics/base/probit.m, scripts/statistics/base/qqplot.m,
scripts/statistics/base/quantile.m, scripts/statistics/base/range.m,
scripts/statistics/base/ranks.m, scripts/statistics/base/run_count.m,
scripts/statistics/base/runlength.m, scripts/statistics/base/skewness.m,
scripts/statistics/base/spearman.m, scripts/statistics/base/statistics.m,
scripts/statistics/base/std.m, scripts/statistics/base/table.m,
scripts/statistics/base/var.m, scripts/statistics/base/zscore.m,
scripts/statistics/distributions/betacdf.m,
scripts/statistics/distributions/betainv.m,
scripts/statistics/distributions/betapdf.m,
scripts/statistics/distributions/betarnd.m,
scripts/statistics/distributions/binocdf.m,
scripts/statistics/distributions/binoinv.m,
scripts/statistics/distributions/binopdf.m,
scripts/statistics/distributions/binornd.m,
scripts/statistics/distributions/cauchy_cdf.m,
scripts/statistics/distributions/cauchy_inv.m,
scripts/statistics/distributions/cauchy_pdf.m,
scripts/statistics/distributions/cauchy_rnd.m,
scripts/statistics/distributions/chi2cdf.m,
scripts/statistics/distributions/chi2inv.m,
scripts/statistics/distributions/chi2pdf.m,
scripts/statistics/distributions/chi2rnd.m,
scripts/statistics/distributions/discrete_cdf.m,
scripts/statistics/distributions/discrete_inv.m,
scripts/statistics/distributions/discrete_pdf.m,
scripts/statistics/distributions/discrete_rnd.m,
scripts/statistics/distributions/empirical_cdf.m,
scripts/statistics/distributions/empirical_inv.m,
scripts/statistics/distributions/empirical_pdf.m,
scripts/statistics/distributions/empirical_rnd.m,
scripts/statistics/distributions/expcdf.m,
scripts/statistics/distributions/expinv.m,
scripts/statistics/distributions/exppdf.m,
scripts/statistics/distributions/exprnd.m,
scripts/statistics/distributions/fcdf.m,
scripts/statistics/distributions/finv.m,
scripts/statistics/distributions/fpdf.m,
scripts/statistics/distributions/frnd.m,
scripts/statistics/distributions/gamcdf.m,
scripts/statistics/distributions/gaminv.m,
scripts/statistics/distributions/gampdf.m,
scripts/statistics/distributions/gamrnd.m,
scripts/statistics/distributions/geocdf.m,
scripts/statistics/distributions/geoinv.m,
scripts/statistics/distributions/geopdf.m,
scripts/statistics/distributions/geornd.m,
scripts/statistics/distributions/hygecdf.m,
scripts/statistics/distributions/hygeinv.m,
scripts/statistics/distributions/hygepdf.m,
scripts/statistics/distributions/hygernd.m,
scripts/statistics/distributions/kolmogorov_smirnov_cdf.m,
scripts/statistics/distributions/laplace_cdf.m,
scripts/statistics/distributions/laplace_inv.m,
scripts/statistics/distributions/laplace_pdf.m,
scripts/statistics/distributions/laplace_rnd.m,
scripts/statistics/distributions/logistic_cdf.m,
scripts/statistics/distributions/logistic_inv.m,
scripts/statistics/distributions/logistic_pdf.m,
scripts/statistics/distributions/logistic_rnd.m,
scripts/statistics/distributions/logncdf.m,
scripts/statistics/distributions/logninv.m,
scripts/statistics/distributions/lognpdf.m,
scripts/statistics/distributions/lognrnd.m,
scripts/statistics/distributions/nbincdf.m,
scripts/statistics/distributions/nbininv.m,
scripts/statistics/distributions/nbinpdf.m,
scripts/statistics/distributions/nbinrnd.m,
scripts/statistics/distributions/normcdf.m,
scripts/statistics/distributions/norminv.m,
scripts/statistics/distributions/normpdf.m,
scripts/statistics/distributions/normrnd.m,
scripts/statistics/distributions/poisscdf.m,
scripts/statistics/distributions/poissinv.m,
scripts/statistics/distributions/poisspdf.m,
scripts/statistics/distributions/poissrnd.m,
scripts/statistics/distributions/stdnormal_cdf.m,
scripts/statistics/distributions/stdnormal_inv.m,
scripts/statistics/distributions/stdnormal_pdf.m,
scripts/statistics/distributions/stdnormal_rnd.m,
scripts/statistics/distributions/tcdf.m,
scripts/statistics/distributions/tinv.m,
scripts/statistics/distributions/tpdf.m,
scripts/statistics/distributions/trnd.m,
scripts/statistics/distributions/unidcdf.m,
scripts/statistics/distributions/unidinv.m,
scripts/statistics/distributions/unidpdf.m,
scripts/statistics/distributions/unidrnd.m,
scripts/statistics/distributions/unifcdf.m,
scripts/statistics/distributions/unifinv.m,
scripts/statistics/distributions/unifpdf.m,
scripts/statistics/distributions/unifrnd.m,
scripts/statistics/distributions/wblcdf.m,
scripts/statistics/distributions/wblinv.m,
scripts/statistics/distributions/wblpdf.m,
scripts/statistics/distributions/wblrnd.m,
scripts/statistics/distributions/wienrnd.m,
scripts/statistics/models/logistic_regression.m,
scripts/statistics/models/private/logistic_regression_derivatives.m,
scripts/statistics/models/private/logistic_regression_likelihood.m,
scripts/statistics/tests/anova.m, scripts/statistics/tests/bartlett_test.m,
scripts/statistics/tests/chisquare_test_homogeneity.m,
scripts/statistics/tests/chisquare_test_independence.m,
scripts/statistics/tests/cor_test.m,
scripts/statistics/tests/f_test_regression.m,
scripts/statistics/tests/hotelling_test.m,
scripts/statistics/tests/hotelling_test_2.m,
scripts/statistics/tests/kolmogorov_smirnov_test.m,
scripts/statistics/tests/kolmogorov_smirnov_test_2.m,
scripts/statistics/tests/kruskal_wallis_test.m,
scripts/statistics/tests/manova.m, scripts/statistics/tests/mcnemar_test.m,
scripts/statistics/tests/prop_test_2.m, scripts/statistics/tests/run_test.m,
scripts/statistics/tests/sign_test.m, scripts/statistics/tests/t_test.m,
scripts/statistics/tests/t_test_2.m,
scripts/statistics/tests/t_test_regression.m,
scripts/statistics/tests/u_test.m, scripts/statistics/tests/var_test.m,
scripts/statistics/tests/welch_test.m,
scripts/statistics/tests/wilcoxon_test.m, scripts/statistics/tests/z_test.m,
scripts/statistics/tests/z_test_2.m, scripts/strings/base2dec.m,
scripts/strings/bin2dec.m, scripts/strings/blanks.m, scripts/strings/cstrcat.m,
scripts/strings/deblank.m, scripts/strings/dec2base.m,
scripts/strings/dec2bin.m, scripts/strings/dec2hex.m,
scripts/strings/findstr.m, scripts/strings/hex2dec.m, scripts/strings/index.m,
scripts/strings/isletter.m, scripts/strings/isstrprop.m,
scripts/strings/mat2str.m, scripts/strings/ostrsplit.m,
scripts/strings/regexptranslate.m, scripts/strings/rindex.m,
scripts/strings/str2num.m, scripts/strings/strcat.m, scripts/strings/strchr.m,
scripts/strings/strjoin.m, scripts/strings/strjust.m,
scripts/strings/strmatch.m, scripts/strings/strsplit.m,
scripts/strings/strtok.m, scripts/strings/strtrim.m,
scripts/strings/strtrunc.m, scripts/strings/substr.m,
scripts/strings/untabify.m, scripts/strings/validatestring.m,
scripts/testfun/__have_feature__.m, scripts/testfun/__printf_assert__.m,
scripts/testfun/__prog_output_assert__.m, scripts/testfun/__run_test_suite__.m,
scripts/testfun/assert.m, scripts/testfun/demo.m, scripts/testfun/example.m,
scripts/testfun/fail.m, scripts/testfun/private/compare_plot_demos.m,
scripts/testfun/private/dump_demos.m,
scripts/testfun/private/html_compare_plot_demos.m, scripts/testfun/rundemos.m,
scripts/testfun/runtests.m, scripts/testfun/speed.m, scripts/testfun/test.m,
scripts/time/addtodate.m, scripts/time/asctime.m, scripts/time/calendar.m,
scripts/time/clock.m, scripts/time/ctime.m, scripts/time/date.m,
scripts/time/datenum.m, scripts/time/datestr.m, scripts/time/datevec.m,
scripts/time/eomday.m, scripts/time/etime.m, scripts/time/is_leap_year.m,
scripts/time/now.m, scripts/time/weekday.m, src/display-available.c,
src/display-available.h, src/main-cli.cc, src/main-gui.cc, src/main.in.cc,
src/mkoctfile.in.cc, src/octave-build-info.h, src/octave-build-info.in.cc,
src/octave-config.in.cc, src/shared-fcns.h, test/args.tst,
test/classdef/classdef.tst, test/classes/classes.tst, test/colormaps.tst,
test/complex.tst, test/ctor-vs-method/ctor-vs-method.tst, test/diag-perm.tst,
test/error.tst, test/eval-catch.tst,
test/fcn-handle-derived-resolution/fcn-handle-derived-resolution.tst,
test/fntests.m, test/for.tst, test/func.tst, test/global.tst, test/if.tst,
test/index.tst, test/io.tst, test/jit.tst, test/line-continue.tst,
test/logical-index.tst, test/nest/nest.tst, test/null-assign.tst,
test/parser.tst, test/prefer.tst, test/range.tst, test/recursion.tst,
test/return.tst, test/slice.tst, test/struct.tst, test/switch.tst,
test/system.tst, test/transpose.tst, test/try.tst, test/unwind.tst,
test/while.tst:
Use the same Copyright formatting throughout Octave.
author | Rik <rik@octave.org> |
---|---|
date | Sun, 13 Nov 2016 20:33:47 -0800 |
parents | ddbc3f9f0136 |
children | ba8c5dbc5cc0 |
rev | line source |
---|---|
22323
bac0d6f07a3e
maint: Update copyright notices for 2016.
John W. Eaton <jwe@octave.org>
parents:
22302
diff
changeset
|
1 ## Copyright (C) 2010-2016 David Bateman |
6146 | 2 ## |
6440 | 3 ## This file is part of Octave. |
4 ## | |
5 ## Octave is free software; you can redistribute it and/or modify it | |
6 ## under the terms of the GNU General Public License as published by | |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22631
diff
changeset
|
7 ## the Free Software Foundation; either version 3 of the License, or |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22631
diff
changeset
|
8 ## (at your option) any later version. |
6440 | 9 ## |
10 ## Octave is distributed in the hope that it will be useful, but | |
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22631
diff
changeset
|
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22631
diff
changeset
|
13 ## GNU General Public License for more details. |
6146 | 14 ## |
15 ## You should have received a copy of the GNU General Public License | |
7016 | 16 ## along with Octave; see the file COPYING. If not, see |
17 ## <http://www.gnu.org/licenses/>. | |
6146 | 18 |
19 ## -*- texinfo -*- | |
20852
516bb87ea72e
2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents:
20781
diff
changeset
|
20 ## @deftypefn {} {} legend (@var{str1}, @var{str2}, @dots{}) |
516bb87ea72e
2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents:
20781
diff
changeset
|
21 ## @deftypefnx {} {} legend (@var{matstr}) |
516bb87ea72e
2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents:
20781
diff
changeset
|
22 ## @deftypefnx {} {} legend (@var{cellstr}) |
516bb87ea72e
2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents:
20781
diff
changeset
|
23 ## @deftypefnx {} {} legend (@dots{}, "location", @var{pos}) |
516bb87ea72e
2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents:
20781
diff
changeset
|
24 ## @deftypefnx {} {} legend (@dots{}, "orientation", @var{orient}) |
516bb87ea72e
2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents:
20781
diff
changeset
|
25 ## @deftypefnx {} {} legend (@var{hax}, @dots{}) |
516bb87ea72e
2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents:
20781
diff
changeset
|
26 ## @deftypefnx {} {} legend (@var{hobjs}, @dots{}) |
516bb87ea72e
2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents:
20781
diff
changeset
|
27 ## @deftypefnx {} {} legend (@var{hax}, @var{hobjs}, @dots{}) |
516bb87ea72e
2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents:
20781
diff
changeset
|
28 ## @deftypefnx {} {} legend ("@var{option}") |
516bb87ea72e
2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents:
20781
diff
changeset
|
29 ## @deftypefnx {} {[@var{hleg}, @var{hleg_obj}, @var{hplot}, @var{labels}] =} legend (@dots{}) |
6146 | 30 ## |
17122
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17119
diff
changeset
|
31 ## Display a legend for the current axes using the specified strings as labels. |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17119
diff
changeset
|
32 ## |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17119
diff
changeset
|
33 ## Legend entries may be specified as individual character string arguments, |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17119
diff
changeset
|
34 ## a character array, or a cell array of character strings. |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17119
diff
changeset
|
35 ## |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17119
diff
changeset
|
36 ## If the first argument @var{hax} is an axes handle, then plot into this axis, |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17119
diff
changeset
|
37 ## rather than the current axes returned by @code{gca}. If the handles, |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17119
diff
changeset
|
38 ## @var{hobjs}, are not specified then the legend's strings will be associated |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17119
diff
changeset
|
39 ## with the axes' descendants. @code{legend} works on line graphs, |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17119
diff
changeset
|
40 ## bar graphs, etc. A plot must exist before legend is called. |
6146 | 41 ## |
6895 | 42 ## The optional parameter @var{pos} specifies the location of the legend |
43 ## as follows: | |
6146 | 44 ## |
6977 | 45 ## @multitable @columnfractions 0.06 0.14 0.80 |
17204
d87179b38bcf
doc: Touch up alignment of @multitables in plot, legend, newplot.
Rik <rik@octave.org>
parents:
17190
diff
changeset
|
46 ## @headitem @tab pos @tab location of the legend |
d87179b38bcf
doc: Touch up alignment of @multitables in plot, legend, newplot.
Rik <rik@octave.org>
parents:
17190
diff
changeset
|
47 ## @item @tab north @tab center top |
d87179b38bcf
doc: Touch up alignment of @multitables in plot, legend, newplot.
Rik <rik@octave.org>
parents:
17190
diff
changeset
|
48 ## @item @tab south @tab center bottom |
d87179b38bcf
doc: Touch up alignment of @multitables in plot, legend, newplot.
Rik <rik@octave.org>
parents:
17190
diff
changeset
|
49 ## @item @tab east @tab right center |
d87179b38bcf
doc: Touch up alignment of @multitables in plot, legend, newplot.
Rik <rik@octave.org>
parents:
17190
diff
changeset
|
50 ## @item @tab west @tab left center |
d87179b38bcf
doc: Touch up alignment of @multitables in plot, legend, newplot.
Rik <rik@octave.org>
parents:
17190
diff
changeset
|
51 ## @item @tab northeast @tab right top (default) |
d87179b38bcf
doc: Touch up alignment of @multitables in plot, legend, newplot.
Rik <rik@octave.org>
parents:
17190
diff
changeset
|
52 ## @item @tab northwest @tab left top |
d87179b38bcf
doc: Touch up alignment of @multitables in plot, legend, newplot.
Rik <rik@octave.org>
parents:
17190
diff
changeset
|
53 ## @item @tab southeast @tab right bottom |
d87179b38bcf
doc: Touch up alignment of @multitables in plot, legend, newplot.
Rik <rik@octave.org>
parents:
17190
diff
changeset
|
54 ## @item @tab southwest @tab left bottom |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11563
diff
changeset
|
55 ## @item |
17204
d87179b38bcf
doc: Touch up alignment of @multitables in plot, legend, newplot.
Rik <rik@octave.org>
parents:
17190
diff
changeset
|
56 ## @item @tab outside @tab can be appended to any location string |
6146 | 57 ## @end multitable |
58 ## | |
20173
777f26aa8e3e
doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents:
19880
diff
changeset
|
59 ## The optional parameter @var{orient} determines if the key elements are |
777f26aa8e3e
doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents:
19880
diff
changeset
|
60 ## placed vertically or horizontally. The allowed values are |
17281
bc924baa2c4e
doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents:
17204
diff
changeset
|
61 ## @qcode{"vertical"} (default) or @qcode{"horizontal"}. |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
62 ## |
10666
7a43499f074a
legend.m: Improve documentation string
Rik <octave@nomad.inbox5.com>
parents:
10662
diff
changeset
|
63 ## The following customizations are available using @var{option}: |
6146 | 64 ## |
7148 | 65 ## @table @asis |
17281
bc924baa2c4e
doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents:
17204
diff
changeset
|
66 ## @item @qcode{"show"} |
10666
7a43499f074a
legend.m: Improve documentation string
Rik <octave@nomad.inbox5.com>
parents:
10662
diff
changeset
|
67 ## Show legend on the plot |
10821
693e22af08ae
Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents:
10666
diff
changeset
|
68 ## |
17281
bc924baa2c4e
doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents:
17204
diff
changeset
|
69 ## @item @qcode{"hide"} |
10666
7a43499f074a
legend.m: Improve documentation string
Rik <octave@nomad.inbox5.com>
parents:
10662
diff
changeset
|
70 ## Hide legend on the plot |
10821
693e22af08ae
Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents:
10666
diff
changeset
|
71 ## |
17281
bc924baa2c4e
doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents:
17204
diff
changeset
|
72 ## @item @qcode{"toggle"} |
bc924baa2c4e
doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents:
17204
diff
changeset
|
73 ## Toggles between @qcode{"hide"} and @qcode{"show"} |
12394
c2e1973d870b
legend.m: "legend off" should delete the legend object.
Ben Abbott <bpabbott@mac.com>
parents:
12388
diff
changeset
|
74 ## |
17281
bc924baa2c4e
doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents:
17204
diff
changeset
|
75 ## @item @qcode{"boxon"} |
17532
492d609d2d75
legend.m: Default text labels to "right" alignment for Matlab compatibility.
Rik <rik@octave.org>
parents:
17530
diff
changeset
|
76 ## Show a box around legend (default) |
10821
693e22af08ae
Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents:
10666
diff
changeset
|
77 ## |
17281
bc924baa2c4e
doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents:
17204
diff
changeset
|
78 ## @item @qcode{"boxoff"} |
10666
7a43499f074a
legend.m: Improve documentation string
Rik <octave@nomad.inbox5.com>
parents:
10662
diff
changeset
|
79 ## Hide the box around legend |
10821
693e22af08ae
Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents:
10666
diff
changeset
|
80 ## |
17532
492d609d2d75
legend.m: Default text labels to "right" alignment for Matlab compatibility.
Rik <rik@octave.org>
parents:
17530
diff
changeset
|
81 ## @item @qcode{"right"} |
492d609d2d75
legend.m: Default text labels to "right" alignment for Matlab compatibility.
Rik <rik@octave.org>
parents:
17530
diff
changeset
|
82 ## Place label text to the right of the keys (default) |
492d609d2d75
legend.m: Default text labels to "right" alignment for Matlab compatibility.
Rik <rik@octave.org>
parents:
17530
diff
changeset
|
83 ## |
17281
bc924baa2c4e
doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents:
17204
diff
changeset
|
84 ## @item @qcode{"left"} |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
85 ## Place label text to the left of the keys |
10821
693e22af08ae
Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents:
10666
diff
changeset
|
86 ## |
17281
bc924baa2c4e
doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents:
17204
diff
changeset
|
87 ## @item @qcode{"off"} |
12394
c2e1973d870b
legend.m: "legend off" should delete the legend object.
Ben Abbott <bpabbott@mac.com>
parents:
12388
diff
changeset
|
88 ## Delete the legend object |
6146 | 89 ## @end table |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
90 ## |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
91 ## The optional output values are |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
92 ## |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
93 ## @table @var |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
94 ## @item hleg |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
95 ## The graphics handle of the legend object. |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
96 ## |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
97 ## @item hleg_obj |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
98 ## Graphics handles to the text and line objects which make up the legend. |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
99 ## |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
100 ## @item hplot |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
101 ## Graphics handles to the plot objects which were used in making the legend. |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
102 ## |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
103 ## @item labels |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
104 ## A cell array of strings of the labels in the legend. |
17503
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
105 ## @end table |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
106 ## |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
107 ## The legend label text is either provided in the call to @code{legend} or |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
108 ## is taken from the DisplayName property of graphics objects. If no |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
109 ## labels or DisplayNames are available, then the label text is simply |
17281
bc924baa2c4e
doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents:
17204
diff
changeset
|
110 ## @qcode{"data1"}, @qcode{"data2"}, @dots{}, @nospell{@qcode{"dataN"}}. |
17122
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17119
diff
changeset
|
111 ## |
eaab03308c0b
doc: Rewrite docstrings for most plot functions.
Rik <rik@octave.org>
parents:
17119
diff
changeset
|
112 ## Implementation Note: A legend is implemented as an additional axes object |
17503
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
113 ## of the current figure with the @qcode{"tag"} set to @qcode{"legend"}. |
17281
bc924baa2c4e
doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents:
17204
diff
changeset
|
114 ## Properties of the legend object may be manipulated directly by using |
bc924baa2c4e
doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents:
17204
diff
changeset
|
115 ## @code{set}. |
6146 | 116 ## @end deftypefn |
117 | |
17503
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
118 function [hleg, hleg_obj, hplot, labels] = legend (varargin) |
6146 | 119 |
11246
c463aed850b0
allow legend and gcf to work when no figure is present
John W. Eaton <jwe@octave.org>
parents:
11200
diff
changeset
|
120 if (nargin > 0 |
c463aed850b0
allow legend and gcf to work when no figure is present
John W. Eaton <jwe@octave.org>
parents:
11200
diff
changeset
|
121 && (! ishandle (varargin{1}) |
c463aed850b0
allow legend and gcf to work when no figure is present
John W. Eaton <jwe@octave.org>
parents:
11200
diff
changeset
|
122 || (strcmp (get (varargin{1}, "type"), "axes") |
c463aed850b0
allow legend and gcf to work when no figure is present
John W. Eaton <jwe@octave.org>
parents:
11200
diff
changeset
|
123 && ! strcmp (get (varargin{1}, "tag"), "legend")))) |
17065
991e8a386aa3
legend.m: Update to use new __plt_get_axis_arg__.
Rik <rik@octave.org>
parents:
16973
diff
changeset
|
124 [ca, varargin, nargin] = __plt_get_axis_arg__ ("legend", varargin{:}); |
991e8a386aa3
legend.m: Update to use new __plt_get_axis_arg__.
Rik <rik@octave.org>
parents:
16973
diff
changeset
|
125 if (isempty (ca)) |
991e8a386aa3
legend.m: Update to use new __plt_get_axis_arg__.
Rik <rik@octave.org>
parents:
16973
diff
changeset
|
126 ca = gca (); |
991e8a386aa3
legend.m: Update to use new __plt_get_axis_arg__.
Rik <rik@octave.org>
parents:
16973
diff
changeset
|
127 endif |
19880
f25fe5369022
Don't assume axes parent is a figure (bug #44394)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
19833
diff
changeset
|
128 fig = ancestor (ca, "figure"); |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
129 else |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
130 fig = get (0, "currentfigure"); |
11246
c463aed850b0
allow legend and gcf to work when no figure is present
John W. Eaton <jwe@octave.org>
parents:
11200
diff
changeset
|
131 if (isempty (fig)) |
c463aed850b0
allow legend and gcf to work when no figure is present
John W. Eaton <jwe@octave.org>
parents:
11200
diff
changeset
|
132 fig = gcf (); |
c463aed850b0
allow legend and gcf to work when no figure is present
John W. Eaton <jwe@octave.org>
parents:
11200
diff
changeset
|
133 endif |
c463aed850b0
allow legend and gcf to work when no figure is present
John W. Eaton <jwe@octave.org>
parents:
11200
diff
changeset
|
134 ca = gca (); |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
135 endif |
6146 | 136 |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
137 ## Special handling for plotyy which has two axes objects |
13216 | 138 if (ishandle (ca) && isprop (ca, "__plotyy_axes__")) |
139 plty = get (ca, "__plotyy_axes__"); | |
140 if (isscalar (plty) && ishandle (plty)) | |
11199
91c606a68693
minor fix to previous changeset
David Bateman <dbateman@free.fr>
parents:
11198
diff
changeset
|
141 ca = [ca, plty]; |
13216 | 142 elseif (iscell (plty)) |
11199
91c606a68693
minor fix to previous changeset
David Bateman <dbateman@free.fr>
parents:
11198
diff
changeset
|
143 ca = [ca, plty{:}]; |
13216 | 144 elseif (all (ishandle (plty))) |
145 ca = [ca, plty(:).']; | |
146 else | |
21751
b571fc85953f
maint: Use two spaces after period to indicate sentence break.
Rik <rik@octave.org>
parents:
21652
diff
changeset
|
147 error ("legend.m: This should not happen. File a bug report."); |
11199
91c606a68693
minor fix to previous changeset
David Bateman <dbateman@free.fr>
parents:
11198
diff
changeset
|
148 endif |
13216 | 149 ## Remove duplicates while preserving order |
150 [~, n] = unique (ca); | |
15440
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
151 ca = ca(sort (n)); |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
152 endif |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
153 |
11246
c463aed850b0
allow legend and gcf to work when no figure is present
John W. Eaton <jwe@octave.org>
parents:
11200
diff
changeset
|
154 if (nargin > 0 && all (ishandle (varargin{1}))) |
10662
3afcd24ced61
legend.m: Key labels for specified objects.
Ben Abbott <bpabbott@mac.com>
parents:
10549
diff
changeset
|
155 kids = flipud (varargin{1}(:)); |
3afcd24ced61
legend.m: Key labels for specified objects.
Ben Abbott <bpabbott@mac.com>
parents:
10549
diff
changeset
|
156 varargin(1) = []; |
3afcd24ced61
legend.m: Key labels for specified objects.
Ben Abbott <bpabbott@mac.com>
parents:
10549
diff
changeset
|
157 else |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
158 kids = ca; |
15440
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
159 kids(strcmp (get (ca, "tag"), "legend")) = []; |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
160 if (isscalar (kids)) |
14868
5d3a684236b0
maint: Use Octave coding conventions for cuddling parentheses in scripts directory
Rik <octave@nomad.inbox5.com>
parents:
14846
diff
changeset
|
161 kids = get (kids, "children")(:); |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
162 else |
17677
c14e5af64de4
legend.m: Fix invalid legend handle with plotyy (bug #35321).
Rik <rik@octave.org>
parents:
17572
diff
changeset
|
163 kids = flipud (vertcat (get (kids, "children"){:})); |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
164 endif |
10662
3afcd24ced61
legend.m: Key labels for specified objects.
Ben Abbott <bpabbott@mac.com>
parents:
10549
diff
changeset
|
165 endif |
11246
c463aed850b0
allow legend and gcf to work when no figure is present
John W. Eaton <jwe@octave.org>
parents:
11200
diff
changeset
|
166 nargs = numel (varargin); |
10662
3afcd24ced61
legend.m: Key labels for specified objects.
Ben Abbott <bpabbott@mac.com>
parents:
10549
diff
changeset
|
167 nkids = numel (kids); |
3afcd24ced61
legend.m: Key labels for specified objects.
Ben Abbott <bpabbott@mac.com>
parents:
10549
diff
changeset
|
168 |
18734
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
169 ## Find any existing legend object on figure |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
170 hlegend = []; |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
171 fkids = get (fig, "children"); |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
172 for i = 1 : numel (fkids) |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
173 if ( strcmp (get (fkids(i), "type"), "axes") |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
174 && strcmp (get (fkids(i), "tag"), "legend")) |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
175 udata = get (fkids(i), "userdata"); |
18753
5f37573a6868
legend.m: Fix changing legend properties with handle for plotyy (bug #41970).
Rik <rik@octave.org>
parents:
18734
diff
changeset
|
176 if (any (ismember (udata.handle, ca))) |
18734
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
177 hlegend = fkids(i); |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
178 break; |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
179 endif |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
180 endif |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
181 endfor |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
182 |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
183 orientation = "default"; |
16796
519343308ab1
Rename "position" variable to "location" in legend.m
Ben Abbott <bpabbott@mac.com>
parents:
16795
diff
changeset
|
184 location = "default"; |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
185 show = "create"; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
186 textpos = "default"; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
187 box = "default"; |
18734
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
188 delete_leg = false; |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
189 find_leg_hdl = (nargs == 0); |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
190 |
16796
519343308ab1
Rename "position" variable to "location" in legend.m
Ben Abbott <bpabbott@mac.com>
parents:
16795
diff
changeset
|
191 ## Process old way of specifying location with a number rather than a string. |
6146 | 192 if (nargs > 0) |
193 pos = varargin{nargs}; | |
13279
984359717d71
Use common code idiom for checking whether a double value is an integer.
Rik <octave@nomad.inbox5.com>
parents:
13216
diff
changeset
|
194 if (isnumeric (pos) && isscalar (pos) && pos == fix (pos)) |
6395 | 195 if (pos >= -1 && pos <= 4) |
16796
519343308ab1
Rename "position" variable to "location" in legend.m
Ben Abbott <bpabbott@mac.com>
parents:
16795
diff
changeset
|
196 location = [{"northeastoutside", "best", "northeast", |
11003
b1cfff739af5
legend.m: Index location cellstr to obtain a string.
Ben Abbott <bpabbott@mac.com>
parents:
10999
diff
changeset
|
197 "northwest", "southwest", "southeast"}] {pos + 2}; |
20735
418ae0cb752f
Replace ++,-- with in-place operators for performance.
Rik <rik@octave.org>
parents:
20711
diff
changeset
|
198 nargs -= 1; |
6146 | 199 else |
16796
519343308ab1
Rename "position" variable to "location" in legend.m
Ben Abbott <bpabbott@mac.com>
parents:
16795
diff
changeset
|
200 error ("legend: invalid location specified"); |
6146 | 201 endif |
202 endif | |
203 endif | |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11563
diff
changeset
|
204 |
16796
519343308ab1
Rename "position" variable to "location" in legend.m
Ben Abbott <bpabbott@mac.com>
parents:
16795
diff
changeset
|
205 ## Find location and orientation property/value pairs |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
206 while (nargs > 1) |
6977 | 207 pos = varargin{nargs-1}; |
7054 | 208 str = varargin{nargs}; |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
209 if (strcmpi (pos, "location") && ischar (str)) |
16796
519343308ab1
Rename "position" variable to "location" in legend.m
Ben Abbott <bpabbott@mac.com>
parents:
16795
diff
changeset
|
210 location = lower (str); |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
211 nargs -= 2; |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
212 elseif (strcmpi (pos, "orientation") && ischar (str)) |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
213 orientation = lower (str); |
10989
6ea65c5de87a
Respect the units and paperunits figure properties and the units and fontunits axes properties
David Bateman <dbateman@free.fr>
parents:
10949
diff
changeset
|
214 nargs -= 2; |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
215 else |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
216 break; |
6977 | 217 endif |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
218 endwhile |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
219 |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11563
diff
changeset
|
220 ## Validate the orientation |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
221 switch (orientation) |
15440
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
222 case {"vertical", "horizontal", "default"} |
16805
2281d957cde6
legend.m: Tweak code for Octave coding conventions.
Rik <rik@octave.org>
parents:
16800
diff
changeset
|
223 ## These are all accepted orientations. |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
224 otherwise |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
225 error ("legend: unrecognized legend orientation"); |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
226 endswitch |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
227 |
16796
519343308ab1
Rename "position" variable to "location" in legend.m
Ben Abbott <bpabbott@mac.com>
parents:
16795
diff
changeset
|
228 ## Validate the location type |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
229 outside = false; |
16796
519343308ab1
Rename "position" variable to "location" in legend.m
Ben Abbott <bpabbott@mac.com>
parents:
16795
diff
changeset
|
230 inout = strfind (location, "outside"); |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
231 if (! isempty (inout)) |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
232 outside = true; |
16796
519343308ab1
Rename "position" variable to "location" in legend.m
Ben Abbott <bpabbott@mac.com>
parents:
16795
diff
changeset
|
233 location = location(1:inout-1); |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
234 else |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
235 outside = false; |
6977 | 236 endif |
6146 | 237 |
16796
519343308ab1
Rename "position" variable to "location" in legend.m
Ben Abbott <bpabbott@mac.com>
parents:
16795
diff
changeset
|
238 switch (location) |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
239 case {"north", "south", "east", "west", "northeast", "northwest", ... |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
240 "southeast", "southwest", "default"} |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
241 case "best" |
16805
2281d957cde6
legend.m: Tweak code for Octave coding conventions.
Rik <rik@octave.org>
parents:
16800
diff
changeset
|
242 warning ("legend: 'best' not yet implemented for location specifier\n"); |
16796
519343308ab1
Rename "position" variable to "location" in legend.m
Ben Abbott <bpabbott@mac.com>
parents:
16795
diff
changeset
|
243 location = "northeast"; |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
244 otherwise |
16796
519343308ab1
Rename "position" variable to "location" in legend.m
Ben Abbott <bpabbott@mac.com>
parents:
16795
diff
changeset
|
245 error ("legend: unrecognized legend location"); |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
246 endswitch |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
247 |
6146 | 248 if (nargs == 1) |
249 arg = varargin{1}; | |
250 if (ischar (arg)) | |
251 if (rows (arg) == 1) | |
15440
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
252 str = tolower (strtrim (arg)); |
10549 | 253 switch (str) |
15440
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
254 case "off" |
18734
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
255 delete_leg = true; |
15440
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
256 case "hide" |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
257 show = "off"; |
20735
418ae0cb752f
Replace ++,-- with in-place operators for performance.
Rik <rik@octave.org>
parents:
20711
diff
changeset
|
258 nargs -= 1; |
10549 | 259 case "show" |
15440
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
260 if (! isempty (hlegend)) |
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
261 show = "on"; |
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
262 else |
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
263 show = "create"; |
17532
492d609d2d75
legend.m: Default text labels to "right" alignment for Matlab compatibility.
Rik <rik@octave.org>
parents:
17530
diff
changeset
|
264 textpos = "right"; |
15440
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
265 endif |
20735
418ae0cb752f
Replace ++,-- with in-place operators for performance.
Rik <rik@octave.org>
parents:
20711
diff
changeset
|
266 nargs -= 1; |
10549 | 267 case "toggle" |
15440
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
268 if (isempty (hlegend)) |
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
269 show = "create"; |
17532
492d609d2d75
legend.m: Default text labels to "right" alignment for Matlab compatibility.
Rik <rik@octave.org>
parents:
17530
diff
changeset
|
270 textpos = "right"; |
15440
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
271 elseif (strcmp (get (hlegend, "visible"), "off")) |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
272 show = "on"; |
10549 | 273 else |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
274 show = "off"; |
10549 | 275 endif |
20735
418ae0cb752f
Replace ++,-- with in-place operators for performance.
Rik <rik@octave.org>
parents:
20711
diff
changeset
|
276 nargs -= 1; |
10549 | 277 case "boxon" |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
278 box = "on"; |
20735
418ae0cb752f
Replace ++,-- with in-place operators for performance.
Rik <rik@octave.org>
parents:
20711
diff
changeset
|
279 nargs -= 1; |
10549 | 280 case "boxoff" |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
281 box = "off"; |
20735
418ae0cb752f
Replace ++,-- with in-place operators for performance.
Rik <rik@octave.org>
parents:
20711
diff
changeset
|
282 nargs -= 1; |
10549 | 283 case "left" |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
284 textpos = "left"; |
20735
418ae0cb752f
Replace ++,-- with in-place operators for performance.
Rik <rik@octave.org>
parents:
20711
diff
changeset
|
285 nargs -= 1; |
10549 | 286 case "right" |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
287 textpos = "right"; |
20735
418ae0cb752f
Replace ++,-- with in-place operators for performance.
Rik <rik@octave.org>
parents:
20711
diff
changeset
|
288 nargs -= 1; |
10549 | 289 endswitch |
6146 | 290 else |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
291 ## Character matrix of labels |
10549 | 292 varargin = cellstr (arg); |
293 nargs = numel (varargin); | |
6146 | 294 endif |
295 elseif (iscellstr (arg)) | |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
296 ## Cell array of labels |
8529
774b44619c5c
Fix legend order for both horizontal and vertical string cell.
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
8343
diff
changeset
|
297 varargin = arg; |
6146 | 298 nargs = numel (varargin); |
299 else | |
20711
7b608fadc663
Make error messages more specific about the variable and problem encountered.
Rik <rik@octave.org>
parents:
20408
diff
changeset
|
300 error ("legend: single argument must be a string or cellstr"); |
6146 | 301 endif |
14589
fd6e50e2eee6
legend() should accept labels being specified as both cellstrs and char.
Ben Abbott <bpabbott@mac.com>
parents:
14585
diff
changeset
|
302 elseif (nargs > 1 && iscellstr (varargin{1})) |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
303 ## Cell array of labels followed by property/value pairs |
14589
fd6e50e2eee6
legend() should accept labels being specified as both cellstrs and char.
Ben Abbott <bpabbott@mac.com>
parents:
14585
diff
changeset
|
304 varargin = {varargin{1}{:}, varargin{2:end}}; |
fd6e50e2eee6
legend() should accept labels being specified as both cellstrs and char.
Ben Abbott <bpabbott@mac.com>
parents:
14585
diff
changeset
|
305 nargs = numel (varargin); |
6146 | 306 endif |
307 | |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
308 have_labels = (nargs > 0); |
18734
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
309 hobjects = []; |
19833
9fc020886ae9
maint: Clean up m-files to follow Octave coding conventions.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
310 hplots = []; |
18734
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
311 text_strings = {}; |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
312 |
18734
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
313 if (delete_leg) |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
314 delete (hlegend); |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
315 hlegend = []; |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
316 elseif (find_leg_hdl) |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
317 ## Don't change anything about legend. |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
318 ## hleg output will be assigned hlegend value at end of function. |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
319 elseif (strcmp (show, "off")) |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
320 if (! isempty (hlegend)) |
21898
b5313b6cbe72
Simplify handling of 'box' property for legend axes objects.
Rik <rik@octave.org>
parents:
21758
diff
changeset
|
321 set (hlegend, "visible", "off"); |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
322 hlegend = []; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
323 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
324 elseif (strcmp (show, "on")) |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
325 if (! isempty (hlegend)) |
21898
b5313b6cbe72
Simplify handling of 'box' property for legend axes objects.
Rik <rik@octave.org>
parents:
21758
diff
changeset
|
326 set (hlegend, "visible", "on"); |
b5313b6cbe72
Simplify handling of 'box' property for legend axes objects.
Rik <rik@octave.org>
parents:
21758
diff
changeset
|
327 ## NOTE: Matlab sets both "visible" and "box" to "on" for "show on" |
b5313b6cbe72
Simplify handling of 'box' property for legend axes objects.
Rik <rik@octave.org>
parents:
21758
diff
changeset
|
328 ## set (hlegend, "box", "on"); |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
329 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
330 elseif (strcmp (box, "on")) |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
331 if (! isempty (hlegend)) |
21898
b5313b6cbe72
Simplify handling of 'box' property for legend axes objects.
Rik <rik@octave.org>
parents:
21758
diff
changeset
|
332 set (hlegend, "box", "on"); |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
333 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
334 elseif (strcmp (box, "off")) |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
335 if (! isempty (hlegend)) |
21898
b5313b6cbe72
Simplify handling of 'box' property for legend axes objects.
Rik <rik@octave.org>
parents:
21758
diff
changeset
|
336 set (hlegend, "box", "off"); |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
337 endif |
18734
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
338 elseif (! have_labels && ! isempty (hlegend) |
19833
9fc020886ae9
maint: Clean up m-files to follow Octave coding conventions.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
339 && ! (strcmp (location, "default") |
9fc020886ae9
maint: Clean up m-files to follow Octave coding conventions.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
340 && strcmp (orientation, "default"))) |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
341 ## Changing location or orientation of existing legend |
18734
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
342 if (strcmp (location, "default")) |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
343 set (hlegend, "orientation", orientation); |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
344 elseif (strcmp (orientation, "default")) |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
345 if (outside) |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
346 set (hlegend, "location", [location "outside"]); |
12398
735e43b75e45
Allow the legend location and orientation to be set without modifying the legend keys (#32374)
David Bateman <dbateman@free.fr>
parents:
12396
diff
changeset
|
347 else |
18734
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
348 set (hlegend, "location", location); |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
349 endif |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
350 else |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
351 if (outside) |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
352 set (hlegend, "location", [location "outside"], |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
353 "orientation", orientation); |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
354 else |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
355 set (hlegend, "location", location, |
adb948d7fae4
legend.m: Don't create legend for some inputs for Matlab compatibility (bug #42034)
Rik <rik@octave.org>
parents:
18647
diff
changeset
|
356 "orientation", orientation); |
12398
735e43b75e45
Allow the legend location and orientation to be set without modifying the legend keys (#32374)
David Bateman <dbateman@free.fr>
parents:
12396
diff
changeset
|
357 endif |
735e43b75e45
Allow the legend location and orientation to be set without modifying the legend keys (#32374)
David Bateman <dbateman@free.fr>
parents:
12396
diff
changeset
|
358 endif |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
359 else |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
360 ## Create new legend |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
361 hobjects = []; |
19833
9fc020886ae9
maint: Clean up m-files to follow Octave coding conventions.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
362 hplots = []; |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
363 text_strings = {}; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
364 |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
365 if (have_labels) |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
366 ## Check for valid data that can be labeled. |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
367 have_data = false; |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
368 have_dname = false; |
15440
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
369 for k = 1 : nkids |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
370 typ = get (kids(k), "type"); |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
371 if (any (strcmp (typ, {"line", "patch", "surface", "hggroup"}))) |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
372 have_data = true; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
373 break; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
374 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
375 endfor |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
376 |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
377 if (! have_data) |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
378 warning ("legend: plot data is empty; setting key labels has no effect"); |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
379 endif |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
380 else |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
381 ## No labels. Search for DisplayName property. |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
382 have_dname = false; |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
383 for k = 1 : nkids |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
384 hkid = kids(k); |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
385 typ = get (hkid, "type"); |
21904
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
386 if (any (strcmp (typ, {"line", "patch", "surface", "hggroup"}))) |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
387 if (! isempty (get (hkid, "displayname"))) |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
388 have_dname = true; |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
389 break; |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
390 endif |
21904
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
391 endif |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
392 endfor # for loop k = 1 : nkids |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
393 endif # else branch of if (have_labels) |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
394 |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
395 if (have_labels || ! have_dname) |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
396 k = nkids; |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
397 if (! have_labels) |
16805
2281d957cde6
legend.m: Tweak code for Octave coding conventions.
Rik <rik@octave.org>
parents:
16800
diff
changeset
|
398 varargin = arrayfun (@(x) sprintf ("data%d", x), [1:nkids]', |
16799
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
399 "uniformoutput", false); |
16795
38c1a421f082
When no keys are specified and defaults are populated, set have_labels = true.
Ben Abbott <bpabbott@mac.com>
parents:
16728
diff
changeset
|
400 have_labels = true; |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
401 nargs = nkids; |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
402 endif |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
403 for i = 1 : nargs |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
404 arg = varargin{i}; |
21904
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
405 if (! ischar (arg)) |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
406 error ("legend: expecting argument to be a string"); |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
407 endif |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
408 typ = get (kids(k), "type"); |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
409 while (k > 0 |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
410 && ! any (strcmp (typ, {"line","patch","surface","hggroup"}))) |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
411 typ = get (kids(--k), "type"); |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
412 endwhile |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
413 if (k > 0) |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
414 if (have_labels) |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
415 set (kids(k), "displayname", arg); |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
416 endif |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
417 hplots(end+1) = kids(k); |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
418 text_strings(end+1) = arg; |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
419 |
21904
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
420 if (--k == 0) |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
421 break; |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
422 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
423 else |
21904
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
424 break; # k = 0, no further handles to process |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
425 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
426 endfor |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
427 if (have_labels && i < nargs) |
13979
f35b593688a5
Changing the legend's interpreter property should be inherited by the
Ben Abbott <bpabbott@mac.com>
parents:
13937
diff
changeset
|
428 warning ("legend: ignoring extra labels"); |
f35b593688a5
Changing the legend's interpreter property should be inherited by the
Ben Abbott <bpabbott@mac.com>
parents:
13937
diff
changeset
|
429 endif |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
430 else |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
431 ## No labels specified but objects have DisplayName property set. |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
432 k = nkids; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
433 while (k > 0) |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
434 typ = get (kids(k), "type"); |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
435 while (k > 1 |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
436 && ! any (strcmp (typ, {"line","patch","surface","hggroup"}))) |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
437 typ = get (kids(--k), "type"); |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
438 endwhile |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
439 if (! any (strcmp (typ, {"line","patch","surface","hggroup"}))) |
16805
2281d957cde6
legend.m: Tweak code for Octave coding conventions.
Rik <rik@octave.org>
parents:
16800
diff
changeset
|
440 break; |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
441 endif |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
442 if (k > 0) |
21904
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
443 if (! isempty (get (kids(k), "displayname"))) |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
444 hplots(end+1) = kids(k); |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
445 text_strings(end+1) = get (kids(k), "displayname"); |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
446 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
447 if (--k == 0) |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
448 break; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
449 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
450 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
451 endwhile |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
452 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
453 |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
454 if (isempty (hplots)) |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
455 if (! isempty (hlegend)) |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
456 fkids = get (fig, "children"); |
16800
56102c33122d
Fix problems with changeset 286904321282.
Ben Abbott <bpabbott@mac.com>
parents:
16799
diff
changeset
|
457 delete (fkids(fkids == hlegend)); |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
458 hlegend = []; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
459 hobjects = []; |
19833
9fc020886ae9
maint: Clean up m-files to follow Octave coding conventions.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
460 hplots = []; |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
461 text_strings = {}; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
462 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
463 else |
14578
f579a94aacaa
Preserve legend handle when changing properties (Bug # 36259).
Carnë Draug <carandraug+dev@gmail.com>
parents:
14552
diff
changeset
|
464 ## Preserve the old legend if it exists |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
465 if (! isempty (hlegend)) |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
466 if (strcmp (textpos, "default")) |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
467 textpos = get (hlegend, "textposition"); |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
468 endif |
16796
519343308ab1
Rename "position" variable to "location" in legend.m
Ben Abbott <bpabbott@mac.com>
parents:
16795
diff
changeset
|
469 if (strcmp (location, "default")) |
519343308ab1
Rename "position" variable to "location" in legend.m
Ben Abbott <bpabbott@mac.com>
parents:
16795
diff
changeset
|
470 location = get (hlegend, "location"); |
519343308ab1
Rename "position" variable to "location" in legend.m
Ben Abbott <bpabbott@mac.com>
parents:
16795
diff
changeset
|
471 inout = strfind (location, "outside"); |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
472 if (! isempty (inout)) |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
473 outside = true; |
16796
519343308ab1
Rename "position" variable to "location" in legend.m
Ben Abbott <bpabbott@mac.com>
parents:
16795
diff
changeset
|
474 location = location(1:inout-1); |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
475 else |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
476 outside = false; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
477 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
478 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
479 if (strcmp (orientation, "default")) |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
480 orientation = get (hlegend, "orientation"); |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
481 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
482 box = get (hlegend, "box"); |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
483 else |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
484 if (strcmp (textpos, "default")) |
17532
492d609d2d75
legend.m: Default text labels to "right" alignment for Matlab compatibility.
Rik <rik@octave.org>
parents:
17530
diff
changeset
|
485 textpos = "right"; |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
486 endif |
16796
519343308ab1
Rename "position" variable to "location" in legend.m
Ben Abbott <bpabbott@mac.com>
parents:
16795
diff
changeset
|
487 if (strcmp (location, "default")) |
519343308ab1
Rename "position" variable to "location" in legend.m
Ben Abbott <bpabbott@mac.com>
parents:
16795
diff
changeset
|
488 location = "northeast"; |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
489 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
490 if (strcmp (orientation, "default")) |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
491 orientation = "vertical"; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
492 endif |
14529
aabdc8f281f1
legend.m: Change default to boxon for Matlab compatibility (bug #36105).
Rik <octave@nomad.inbox5.com>
parents:
14375
diff
changeset
|
493 box = "on"; |
6272 | 494 endif |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11563
diff
changeset
|
495 |
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11563
diff
changeset
|
496 ## Get axis size and fontsize in points. |
21904
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
497 ## Rely on listener to handle conversion. |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
498 units = get (ca(1), "units"); |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
499 unwind_protect |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
500 set (ca(1), "units", "points"); |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
501 set (ca(1), "fontunits", "points"); |
16799
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
502 if (isempty (hlegend) || ! isprop (hlegend, "unmodified_axes_position")) |
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
503 unmodified_axes_position = get (ca(1), "position"); |
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
504 unmodified_axes_outerposition = get (ca(1), "outerposition"); |
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
505 else |
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
506 unmodified_axes_position = get (hlegend, "unmodified_axes_position"); |
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
507 unmodified_axes_outerposition = get (hlegend, ... |
16805
2281d957cde6
legend.m: Tweak code for Octave coding conventions.
Rik <rik@octave.org>
parents:
16800
diff
changeset
|
508 "unmodified_axes_outerposition"); |
16799
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
509 endif |
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
510 ca_pos = unmodified_axes_position; |
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
511 ca_outpos = unmodified_axes_outerposition; |
16910
8a4e53cf79c9
Modify the plotbox position relative to the keybox position.
Ben Abbott <bpabbott@mac.com>
parents:
16909
diff
changeset
|
512 tightinset = get (ca(1), "tightinset"); |
8a4e53cf79c9
Modify the plotbox position relative to the keybox position.
Ben Abbott <bpabbott@mac.com>
parents:
16909
diff
changeset
|
513 for i = 2 : numel (ca) |
8a4e53cf79c9
Modify the plotbox position relative to the keybox position.
Ben Abbott <bpabbott@mac.com>
parents:
16909
diff
changeset
|
514 tightinset = max (tightinset, get (ca(i), "tightinset")); |
8a4e53cf79c9
Modify the plotbox position relative to the keybox position.
Ben Abbott <bpabbott@mac.com>
parents:
16909
diff
changeset
|
515 endfor |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
516 unwind_protect_cleanup |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
517 set (ca(1), "units", units); |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
518 end_unwind_protect |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
519 |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
520 ## Padding between legend entries horizontally and vertically |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
521 xpad = 2; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
522 ypad = 2; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
523 |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
524 linelength = 15; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
525 |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
526 ## Create the axis first |
18647
ce36233e4849
legend.m: Correctly handle axis handle as first argument (bug #42035).
Rik <rik@octave.org>
parents:
18644
diff
changeset
|
527 oldfig = get (0, "currentfigure"); |
ce36233e4849
legend.m: Correctly handle axis handle as first argument (bug #42035).
Rik <rik@octave.org>
parents:
18644
diff
changeset
|
528 if (oldfig != fig) |
ce36233e4849
legend.m: Correctly handle axis handle as first argument (bug #42035).
Rik <rik@octave.org>
parents:
18644
diff
changeset
|
529 set (0, "currentfigure", fig); |
ce36233e4849
legend.m: Correctly handle axis handle as first argument (bug #42035).
Rik <rik@octave.org>
parents:
18644
diff
changeset
|
530 else |
ce36233e4849
legend.m: Correctly handle axis handle as first argument (bug #42035).
Rik <rik@octave.org>
parents:
18644
diff
changeset
|
531 oldfig = []; |
ce36233e4849
legend.m: Correctly handle axis handle as first argument (bug #42035).
Rik <rik@octave.org>
parents:
18644
diff
changeset
|
532 endif |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
533 curaxes = get (fig, "currentaxes"); |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
534 unwind_protect |
14868
5d3a684236b0
maint: Use Octave coding conventions for cuddling parentheses in scripts directory
Rik <octave@nomad.inbox5.com>
parents:
14846
diff
changeset
|
535 ud = ancestor (hplots, "axes"); |
17503
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
536 if (! isscalar (ud)) |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
537 ud = unique ([ud{:}]); |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
538 endif |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
539 if (isempty (hlegend)) |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
540 addprops = true; |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
541 hlegend = axes ("tag", "legend", "userdata", struct ("handle", ud), |
12440
2ed62b9f949e
synchronization of axes position and outerposition
Konstantinos Poulios <logari81@googlemail.com>
parents:
12437
diff
changeset
|
542 "box", box, |
14529
aabdc8f281f1
legend.m: Change default to boxon for Matlab compatibility (bug #36105).
Rik <octave@nomad.inbox5.com>
parents:
14375
diff
changeset
|
543 "xtick", [], "ytick", [], |
14578
f579a94aacaa
Preserve legend handle when changing properties (Bug # 36259).
Carnë Draug <carandraug+dev@gmail.com>
parents:
14552
diff
changeset
|
544 "xlim", [0, 1], "ylim", [0, 1], |
20286
42b7d7758c4a
Remove axes "interpreter" property (bug #45388)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
20231
diff
changeset
|
545 "activepositionproperty", "position"); |
17534
ec105d91547e
legend.m: Inherit font properties from current axes. Default interpreter to 'tex'.
Rik <rik@octave.org>
parents:
17533
diff
changeset
|
546 ## Inherit properties from current axis |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
547 ## "fontunits" shoud be first because it affects interpretation |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
548 ## of "fontsize" property |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
549 proplist = {"fontunits", "fontangle", "fontname", "fontsize", ... |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
550 "fontweight"}; |
19593
446c46af4b42
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
17885
diff
changeset
|
551 ca_props = get (ca(1), proplist); |
17534
ec105d91547e
legend.m: Inherit font properties from current axes. Default interpreter to 'tex'.
Rik <rik@octave.org>
parents:
17533
diff
changeset
|
552 set (hlegend, proplist, ca_props); |
20408
71bd638e0ef6
legend.m: Fix listeners on legend line objects (bug #45563).
Rik <rik@octave.org>
parents:
20286
diff
changeset
|
553 old_hplots = []; |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
554 else |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
555 addprops = false; |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
556 axes (hlegend); |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
557 delete (get (hlegend, "children")); |
21904
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
558 ## Hack: get list of hplots for which addlistener has been called. |
20408
71bd638e0ef6
legend.m: Fix listeners on legend line objects (bug #45563).
Rik <rik@octave.org>
parents:
20286
diff
changeset
|
559 old_hplots = [ get(hlegend, "deletefcn"){6:end} ]; |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
560 endif |
17503
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
561 if (addprops) |
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
562 addproperty ("edgecolor", hlegend, "color", [0, 0, 0]); |
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
563 addproperty ("textcolor", hlegend, "color", [0, 0, 0]); |
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
564 locations = {"north", "south", "east", "west", ... |
17536
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
565 "{northeast}", "southeast", "northwest", "southwest", ... |
17503
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
566 "northoutside", "southoutside", ... |
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
567 "eastoutside", "westoutside", ... |
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
568 "northeastoutside", "southeastoutside", ... |
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
569 "northwestoutside", "southwestoutside"}; |
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
570 addproperty ("location", hlegend, "radio", strjoin (locations, "|")); |
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
571 addproperty ("orientation", hlegend, "radio", |
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
572 "{vertical}|horizontal"); |
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
573 addproperty ("string", hlegend, "any", text_strings); |
20286
42b7d7758c4a
Remove axes "interpreter" property (bug #45388)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
20231
diff
changeset
|
574 addproperty ("interpreter", hlegend, "textinterpreter"); |
17536
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
575 addproperty ("textposition", hlegend, "radio", "left|{right}"); |
17503
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
576 endif |
17534
ec105d91547e
legend.m: Inherit font properties from current axes. Default interpreter to 'tex'.
Rik <rik@octave.org>
parents:
17533
diff
changeset
|
577 ## Inherit visual properties from legend object |
ec105d91547e
legend.m: Inherit font properties from current axes. Default interpreter to 'tex'.
Rik <rik@octave.org>
parents:
17533
diff
changeset
|
578 fontunits = get (hlegend, "fontunits"); |
ec105d91547e
legend.m: Inherit font properties from current axes. Default interpreter to 'tex'.
Rik <rik@octave.org>
parents:
17533
diff
changeset
|
579 fontangle = get (hlegend, "fontangle"); |
ec105d91547e
legend.m: Inherit font properties from current axes. Default interpreter to 'tex'.
Rik <rik@octave.org>
parents:
17533
diff
changeset
|
580 fontname = get (hlegend, "fontname"); |
16728
5cf7369a74cb
Update legend box when the fontsize changes.
Ben Abbott <bpabbott@mac.com>
parents:
16094
diff
changeset
|
581 fontsize = get (hlegend, "fontsize"); |
17534
ec105d91547e
legend.m: Inherit font properties from current axes. Default interpreter to 'tex'.
Rik <rik@octave.org>
parents:
17533
diff
changeset
|
582 fontweight = get (hlegend, "fontweight"); |
17503
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
583 interpreter = get (hlegend, "interpreter"); |
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
584 textcolor = get (hlegend, "textcolor"); |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
585 ## Add text label to the axis first, checking their extents |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
586 nentries = numel (hplots); |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
587 texthandle = []; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
588 maxwidth = 0; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
589 maxheight = 0; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
590 for k = 1 : nentries |
17503
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
591 halign = ifelse (strcmp (textpos, "right"), "left", "right"); |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
592 texthandle(end+1) = text (0, 0, text_strings{k}, |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
593 "color", textcolor, |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
594 "horizontalalignment", halign, |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
595 "interpreter", interpreter, |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
596 "fontunits", fontunits, |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
597 "fontangle", fontangle, |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
598 "fontname", fontname, |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
599 "fontsize", fontsize, |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
600 "fontweight", fontweight, |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
601 "userdata", hplots(k)); |
15440
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
602 units = get (texthandle(end), "units"); |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
603 unwind_protect |
15440
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
604 set (texthandle(end), "units", "points"); |
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
605 extents = get (texthandle(end), "extent"); |
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
606 maxwidth = max (maxwidth, extents(3)); |
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
607 maxheight = max (maxheight, extents(4)); |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
608 unwind_protect_cleanup |
15440
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
609 set (texthandle(end), "units", units); |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
610 end_unwind_protect |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
611 endfor |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
612 |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
613 num1 = nentries; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
614 if (strcmp (orientation, "vertical")) |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
615 height = nentries * (ypad + maxheight); |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
616 if (outside) |
15440
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
617 if (height > ca_pos(4)) |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
618 ## Avoid shrinking the height of the axis to zero if outside |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
619 num1 = ca_pos(4) / (maxheight + ypad) / 2; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
620 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
621 else |
15440
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
622 if (height > 0.9 * ca_pos(4)) |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
623 num1 = 0.9 * ca_pos(4) / (maxheight + ypad); |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
624 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
625 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
626 else |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
627 width = nentries * (ypad + maxwidth); |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
628 if (outside) |
15440
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
629 if (width > ca_pos(3)) |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
630 ## Avoid shrinking the width of the axis to zero if outside |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
631 num1 = ca_pos(3) / (maxwidth + ypad) / 2; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
632 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
633 else |
15440
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
634 if (width > 0.9 * ca_pos(3)) |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
635 num1 = 0.9 * ca_pos(3) / (maxwidth + ypad); |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
636 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
637 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
638 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
639 num2 = ceil (nentries / num1); |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
640 |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
641 xstep = 3 * xpad + (maxwidth + linelength); |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
642 if (strcmp (textpos, "right")) |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
643 xoffset = xpad; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
644 txoffset = 2 * xpad + linelength; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
645 else |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
646 xoffset = 2 * xpad + maxwidth; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
647 txoffset = xpad + maxwidth; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
648 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
649 ystep = (ypad + maxheight); |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
650 yoffset = ystep / 2; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
651 |
16799
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
652 ## Place the legend in the desired location |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
653 if (strcmp (orientation, "vertical")) |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
654 lpos = [0, 0, num2 * xstep, num1 * ystep]; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
655 else |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
656 lpos = [0, 0, num1 * xstep, num2 * ystep]; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
657 endif |
16799
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
658 |
17503
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
659 gnuplot = strcmp (get (fig, "__graphics_toolkit__"), "gnuplot"); |
16909
8f9ed9d8a478
Allow gnuplot to handle keybox and axes positioning.
Ben Abbott <bpabbott@mac.com>
parents:
16908
diff
changeset
|
660 if (gnuplot) |
16799
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
661 ## Gnuplot places the key (legend) at edge of the figure window. |
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
662 ## OpenGL places the legend box at edge of the unmodified axes |
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
663 ## position. |
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
664 if (isempty (strfind (location, "east"))) |
16909
8f9ed9d8a478
Allow gnuplot to handle keybox and axes positioning.
Ben Abbott <bpabbott@mac.com>
parents:
16908
diff
changeset
|
665 gnuplot_offset = unmodified_axes_outerposition(1) ... |
17503
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
666 + unmodified_axes_outerposition(3) ... |
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
667 - unmodified_axes_position(1) ... |
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
668 - unmodified_axes_position(3); |
16799
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
669 else |
16909
8f9ed9d8a478
Allow gnuplot to handle keybox and axes positioning.
Ben Abbott <bpabbott@mac.com>
parents:
16908
diff
changeset
|
670 gnuplot_offset = unmodified_axes_position(1) ... |
17503
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
671 - unmodified_axes_outerposition(1); |
16799
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
672 endif |
17179
828e8852efa9
legend.m: Add %!demo block showing bug #39697.
Rik <rik@octave.org>
parents:
17174
diff
changeset
|
673 ## FIXME: The "fontsize" is added to match the behavior of OpenGL. |
16799
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
674 ## This implies that a change in fontsize should trigger a listener |
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
675 ## to update the legend. The "2" was determined using a long legend |
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
676 ## key in the absence of any subplots. |
20231
83792dd9bcc1
Use in-place operators in m-files where possible.
Rik <rik@octave.org>
parents:
20173
diff
changeset
|
677 gnuplot_offset -= 2 * fontsize; |
16799
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
678 else |
16909
8f9ed9d8a478
Allow gnuplot to handle keybox and axes positioning.
Ben Abbott <bpabbott@mac.com>
parents:
16908
diff
changeset
|
679 gnuplot_offset = 0; |
16799
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
680 endif |
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
681 |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
682 ## For legend's outside the associated axes postion, |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
683 ## align their edge to the unmodified_axes_outerpostion, |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
684 ## and adjust the axes postion accordingly. |
16796
519343308ab1
Rename "position" variable to "location" in legend.m
Ben Abbott <bpabbott@mac.com>
parents:
16795
diff
changeset
|
685 switch (location) |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
686 case "north" |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
687 if (outside) |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
688 lpos = [ca_pos(1) + (ca_pos(3) - lpos(3)) / 2, ... |
12396
6ba430a75553
Fix for legends with location southeastoutside and soutwestoutside. Pad legend position
David Bateman <dbateman@free.fr>
parents:
12395
diff
changeset
|
689 ca_outpos(2) + ca_outpos(4) - lpos(4) - ypad, lpos(3), ... |
6ba430a75553
Fix for legends with location southeastoutside and soutwestoutside. Pad legend position
David Bateman <dbateman@free.fr>
parents:
12395
diff
changeset
|
690 lpos(4)]; |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
691 |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
692 new_pos = [ca_pos(1), ca_pos(2), ca_pos(3), ca_pos(4) - lpos(4)]; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
693 else |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
694 lpos = [ca_pos(1) + (ca_pos(3) - lpos(3)) / 2, ... |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
695 ca_pos(2) + ca_pos(4) - lpos(4) - ypad, lpos(3), lpos(4)]; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
696 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
697 case "south" |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
698 if (outside) |
12396
6ba430a75553
Fix for legends with location southeastoutside and soutwestoutside. Pad legend position
David Bateman <dbateman@free.fr>
parents:
12395
diff
changeset
|
699 lpos = [ca_pos(1) + (ca_pos(3) - lpos(3)) / 2, ... |
6ba430a75553
Fix for legends with location southeastoutside and soutwestoutside. Pad legend position
David Bateman <dbateman@free.fr>
parents:
12395
diff
changeset
|
700 ca_outpos(2) + ypad, lpos(3), lpos(4)]; |
16910
8a4e53cf79c9
Modify the plotbox position relative to the keybox position.
Ben Abbott <bpabbott@mac.com>
parents:
16909
diff
changeset
|
701 new_pos = [ca_pos(1), lpos(2) + lpos(4) + 2 * ypad ... |
8a4e53cf79c9
Modify the plotbox position relative to the keybox position.
Ben Abbott <bpabbott@mac.com>
parents:
16909
diff
changeset
|
702 + tightinset(2), ca_pos(3), ... |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
703 ca_pos(4) - lpos(4)]; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
704 else |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
705 lpos = [ca_pos(1) + (ca_pos(3) - lpos(3)) / 2, ... |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
706 ca_pos(2) + ypad, lpos(3), lpos(4)]; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
707 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
708 case "east" |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
709 if (outside) |
12396
6ba430a75553
Fix for legends with location southeastoutside and soutwestoutside. Pad legend position
David Bateman <dbateman@free.fr>
parents:
12395
diff
changeset
|
710 lpos = [ca_outpos(1) + ca_outpos(3) - lpos(3) - ypad, ... |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
711 ca_pos(2) + (ca_pos(4) - lpos(4)) / 2, lpos(3), lpos(4)]; |
16910
8a4e53cf79c9
Modify the plotbox position relative to the keybox position.
Ben Abbott <bpabbott@mac.com>
parents:
16909
diff
changeset
|
712 new_pos = [ca_pos(1), ca_pos(2), ... |
8a4e53cf79c9
Modify the plotbox position relative to the keybox position.
Ben Abbott <bpabbott@mac.com>
parents:
16909
diff
changeset
|
713 lpos(1) - 2 * xpad - ca_pos(1) - tightinset(3), ... |
8a4e53cf79c9
Modify the plotbox position relative to the keybox position.
Ben Abbott <bpabbott@mac.com>
parents:
16909
diff
changeset
|
714 ca_pos(4)]; |
16909
8f9ed9d8a478
Allow gnuplot to handle keybox and axes positioning.
Ben Abbott <bpabbott@mac.com>
parents:
16908
diff
changeset
|
715 new_pos(3) = new_pos(3) + gnuplot_offset; |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
716 else |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
717 lpos = [ca_pos(1) + ca_pos(3) - lpos(3) - ypad, ... |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
718 ca_pos(2) + (ca_pos(4) - lpos(4)) / 2, lpos(3), lpos(4)]; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
719 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
720 case "west" |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
721 if (outside) |
12396
6ba430a75553
Fix for legends with location southeastoutside and soutwestoutside. Pad legend position
David Bateman <dbateman@free.fr>
parents:
12395
diff
changeset
|
722 lpos = [ca_outpos(1) + ypad, ... |
6ba430a75553
Fix for legends with location southeastoutside and soutwestoutside. Pad legend position
David Bateman <dbateman@free.fr>
parents:
12395
diff
changeset
|
723 ca_pos(2) + (ca_pos(4) - lpos(4)) / 2, ... |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
724 lpos(3), lpos(4)]; |
16910
8a4e53cf79c9
Modify the plotbox position relative to the keybox position.
Ben Abbott <bpabbott@mac.com>
parents:
16909
diff
changeset
|
725 new_pos = [lpos(1) + lpos(3) + 2 * xpad + tightinset(1), ... |
8a4e53cf79c9
Modify the plotbox position relative to the keybox position.
Ben Abbott <bpabbott@mac.com>
parents:
16909
diff
changeset
|
726 ca_pos(2), ca_pos(3) - lpos(3) - 2 * xpad, ca_pos(4)]; |
16909
8f9ed9d8a478
Allow gnuplot to handle keybox and axes positioning.
Ben Abbott <bpabbott@mac.com>
parents:
16908
diff
changeset
|
727 new_pos(1) = new_pos(1) - gnuplot_offset; |
8f9ed9d8a478
Allow gnuplot to handle keybox and axes positioning.
Ben Abbott <bpabbott@mac.com>
parents:
16908
diff
changeset
|
728 new_pos(3) = new_pos(3) + gnuplot_offset; |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
729 else |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
730 lpos = [ca_pos(1) + ypad, ... |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
731 ca_pos(2) + (ca_pos(4) - lpos(4)) / 2, lpos(3), lpos(4)]; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
732 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
733 case "northeast" |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
734 if (outside) |
12396
6ba430a75553
Fix for legends with location southeastoutside and soutwestoutside. Pad legend position
David Bateman <dbateman@free.fr>
parents:
12395
diff
changeset
|
735 lpos = [ca_outpos(1) + ca_outpos(3) - lpos(3) - ypad, ... |
12395
4d30b4136a3e
legend.m: Align legends to plot box, add demo. Bug 32373.
Ben Abbott <bpabbott@mac.com>
parents:
12394
diff
changeset
|
736 ca_pos(2) + ca_pos(4) - lpos(4), lpos(3), lpos(4)]; |
16910
8a4e53cf79c9
Modify the plotbox position relative to the keybox position.
Ben Abbott <bpabbott@mac.com>
parents:
16909
diff
changeset
|
737 new_pos = [ca_pos(1), ca_pos(2), ... |
8a4e53cf79c9
Modify the plotbox position relative to the keybox position.
Ben Abbott <bpabbott@mac.com>
parents:
16909
diff
changeset
|
738 lpos(1) - 2 * xpad - tightinset(3) - ca_pos(1), ... |
8a4e53cf79c9
Modify the plotbox position relative to the keybox position.
Ben Abbott <bpabbott@mac.com>
parents:
16909
diff
changeset
|
739 ca_pos(4)]; |
16909
8f9ed9d8a478
Allow gnuplot to handle keybox and axes positioning.
Ben Abbott <bpabbott@mac.com>
parents:
16908
diff
changeset
|
740 new_pos(3) = new_pos(3) + gnuplot_offset; |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
741 else |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
742 lpos = [ca_pos(1) + ca_pos(3) - lpos(3) - ypad, ... |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
743 ca_pos(2) + ca_pos(4) - lpos(4) - ypad, lpos(3), lpos(4)]; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
744 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
745 case "northwest" |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
746 if (outside) |
12396
6ba430a75553
Fix for legends with location southeastoutside and soutwestoutside. Pad legend position
David Bateman <dbateman@free.fr>
parents:
12395
diff
changeset
|
747 lpos = [ca_outpos(1) + ypad , ca_pos(2) + ca_pos(4) - lpos(4), ... |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
748 lpos(3), lpos(4)]; |
16910
8a4e53cf79c9
Modify the plotbox position relative to the keybox position.
Ben Abbott <bpabbott@mac.com>
parents:
16909
diff
changeset
|
749 new_pos = [lpos(1) + lpos(3) + 2 * xpad + tightinset(1), ... |
8a4e53cf79c9
Modify the plotbox position relative to the keybox position.
Ben Abbott <bpabbott@mac.com>
parents:
16909
diff
changeset
|
750 ca_pos(2), ca_pos(3) - lpos(3) - 2 * xpad, ca_pos(4)]; |
16909
8f9ed9d8a478
Allow gnuplot to handle keybox and axes positioning.
Ben Abbott <bpabbott@mac.com>
parents:
16908
diff
changeset
|
751 new_pos(1) = new_pos(1) - gnuplot_offset; |
8f9ed9d8a478
Allow gnuplot to handle keybox and axes positioning.
Ben Abbott <bpabbott@mac.com>
parents:
16908
diff
changeset
|
752 new_pos(3) = new_pos(3) + gnuplot_offset; |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
753 else |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
754 lpos = [ca_pos(1) + ypad, ... |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
755 ca_pos(2) + ca_pos(4) - lpos(4) - ypad, lpos(3), lpos(4)]; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
756 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
757 case "southeast" |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
758 if (outside) |
12396
6ba430a75553
Fix for legends with location southeastoutside and soutwestoutside. Pad legend position
David Bateman <dbateman@free.fr>
parents:
12395
diff
changeset
|
759 lpos = [ca_outpos(1) + ca_outpos(3) - lpos(3) - ypad, ... |
6ba430a75553
Fix for legends with location southeastoutside and soutwestoutside. Pad legend position
David Bateman <dbateman@free.fr>
parents:
12395
diff
changeset
|
760 ca_pos(2), lpos(3), lpos(4)]; |
12395
4d30b4136a3e
legend.m: Align legends to plot box, add demo. Bug 32373.
Ben Abbott <bpabbott@mac.com>
parents:
12394
diff
changeset
|
761 new_pos = [ca_pos(1), ca_pos(2), ... |
16910
8a4e53cf79c9
Modify the plotbox position relative to the keybox position.
Ben Abbott <bpabbott@mac.com>
parents:
16909
diff
changeset
|
762 lpos(1) - 2 * xpad - ca_pos(1) - tightinset(3), ... |
8a4e53cf79c9
Modify the plotbox position relative to the keybox position.
Ben Abbott <bpabbott@mac.com>
parents:
16909
diff
changeset
|
763 ca_pos(4)]; |
16909
8f9ed9d8a478
Allow gnuplot to handle keybox and axes positioning.
Ben Abbott <bpabbott@mac.com>
parents:
16908
diff
changeset
|
764 new_pos(3) = new_pos(3) + gnuplot_offset; |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
765 else |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
766 lpos = [ca_pos(1) + ca_pos(3) - lpos(3) - ypad, ... |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
767 ca_pos(2) + ypad, lpos(3), lpos(4)]; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
768 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
769 case "southwest" |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
770 if (outside) |
12396
6ba430a75553
Fix for legends with location southeastoutside and soutwestoutside. Pad legend position
David Bateman <dbateman@free.fr>
parents:
12395
diff
changeset
|
771 lpos = [ca_outpos(1) + ypad, ca_pos(2), lpos(3), lpos(4)]; |
16910
8a4e53cf79c9
Modify the plotbox position relative to the keybox position.
Ben Abbott <bpabbott@mac.com>
parents:
16909
diff
changeset
|
772 new_pos = [lpos(1) + lpos(3) + 2 * xpad + tightinset(1), ... |
8a4e53cf79c9
Modify the plotbox position relative to the keybox position.
Ben Abbott <bpabbott@mac.com>
parents:
16909
diff
changeset
|
773 ca_pos(2), ca_pos(3) - lpos(3) - 2 * xpad, ca_pos(4)]; |
16909
8f9ed9d8a478
Allow gnuplot to handle keybox and axes positioning.
Ben Abbott <bpabbott@mac.com>
parents:
16908
diff
changeset
|
774 new_pos(1) = new_pos(1) - gnuplot_offset; |
8f9ed9d8a478
Allow gnuplot to handle keybox and axes positioning.
Ben Abbott <bpabbott@mac.com>
parents:
16908
diff
changeset
|
775 new_pos(3) = new_pos(3) + gnuplot_offset; |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
776 else |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
777 lpos = [ca_pos(1) + ypad, ca_pos(2) + ypad, lpos(3), lpos(4)]; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
778 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
779 endswitch |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
780 |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
781 units = get (hlegend, "units"); |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
782 unwind_protect |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
783 set (hlegend, "units", "points"); |
12440
2ed62b9f949e
synchronization of axes position and outerposition
Konstantinos Poulios <logari81@googlemail.com>
parents:
12437
diff
changeset
|
784 set (hlegend, "position", lpos); |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
785 unwind_protect_cleanup |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
786 set (hlegend, "units", units); |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
787 end_unwind_protect |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
788 |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
789 ## Now write the line segments and place the text objects correctly |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
790 xk = 0; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
791 yk = 0; |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
792 for k = 1 : numel (hplots) |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
793 hobjects(end+1) = texthandle(k); |
21904
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
794 hplt = hplots(k); |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
795 typ = get (hplt, "type"); |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
796 ## For an hggroup, find an underlying primitive object |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
797 if (strcmp (typ, "hggroup")) |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
798 for hgkid = get (hplt, "children").' |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
799 hgkid_type = get (hgkid, "type"); |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
800 if (any (strcmp (hgkid_type, {"line","patch","surface"}))) |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
801 typ = hgkid_type; |
21937
55f7de37b618
maint: Strip trailing whitespace from source files.
John W. Eaton <jwe@octave.org>
parents:
21904
diff
changeset
|
802 hplt = hgkid; |
21904
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
803 break; |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
804 endif |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
805 endfor |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
806 endif |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
807 |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
808 switch (typ) |
17503
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
809 |
17174
c3c1ebfaa7dc
maint: Use common indentation for switch statement.
Rik <rik@octave.org>
parents:
17125
diff
changeset
|
810 case "line" |
21904
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
811 color = get (hplt, "color"); |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
812 style = get (hplt, "linestyle"); |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
813 lwidth = min (get (hplt, "linewidth"), 5); |
17174
c3c1ebfaa7dc
maint: Use common indentation for switch statement.
Rik <rik@octave.org>
parents:
17125
diff
changeset
|
814 if (! strcmp (style, "none")) |
c3c1ebfaa7dc
maint: Use common indentation for switch statement.
Rik <rik@octave.org>
parents:
17125
diff
changeset
|
815 l1 = line ("xdata", ([xoffset, xoffset + linelength] + xk * xstep) / lpos(3), |
c3c1ebfaa7dc
maint: Use common indentation for switch statement.
Rik <rik@octave.org>
parents:
17125
diff
changeset
|
816 "ydata", [1, 1] .* (lpos(4) - yoffset - yk * ystep) / lpos(4), |
18422
be3702a2eb8a
legend.m: use linewidth from plot object in drawing legend (bug #41283)
Joachim Wiesemann <gnu@jwiesemann.com>
parents:
17885
diff
changeset
|
817 "color", color, "linestyle", style, "linewidth", lwidth, |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
818 "marker", "none", |
21904
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
819 "userdata", hplt); |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
820 hobjects(end+1) = l1; |
17174
c3c1ebfaa7dc
maint: Use common indentation for switch statement.
Rik <rik@octave.org>
parents:
17125
diff
changeset
|
821 endif |
21904
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
822 marker = get (hplt, "marker"); |
17174
c3c1ebfaa7dc
maint: Use common indentation for switch statement.
Rik <rik@octave.org>
parents:
17125
diff
changeset
|
823 if (! strcmp (marker, "none")) |
c3c1ebfaa7dc
maint: Use common indentation for switch statement.
Rik <rik@octave.org>
parents:
17125
diff
changeset
|
824 l1 = line ("xdata", (xoffset + 0.5 * linelength + xk * xstep) / lpos(3), |
c3c1ebfaa7dc
maint: Use common indentation for switch statement.
Rik <rik@octave.org>
parents:
17125
diff
changeset
|
825 "ydata", (lpos(4) - yoffset - yk * ystep) / lpos(4), |
18422
be3702a2eb8a
legend.m: use linewidth from plot object in drawing legend (bug #41283)
Joachim Wiesemann <gnu@jwiesemann.com>
parents:
17885
diff
changeset
|
826 "color", color, "linestyle", "none", "linewidth", lwidth, |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
827 "marker", marker, |
21904
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
828 "markeredgecolor",get (hplt, "markeredgecolor"), |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
829 "markerfacecolor",get (hplt, "markerfacecolor"), |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
830 "markersize", min (get (hplt, "markersize"),10), |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
831 "userdata", hplt); |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
832 hobjects(end+1) = l1; |
17174
c3c1ebfaa7dc
maint: Use common indentation for switch statement.
Rik <rik@octave.org>
parents:
17125
diff
changeset
|
833 endif |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
834 |
21904
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
835 if (! any (hplt == old_hplots)) |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
836 addlistener (hplt, "color", |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
837 {@updateline, hlegend, linelength, false}); |
21904
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
838 addlistener (hplt, "linestyle", |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
839 {@updateline, hlegend, linelength, false}); |
21904
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
840 addlistener (hplt, "linewidth", |
18422
be3702a2eb8a
legend.m: use linewidth from plot object in drawing legend (bug #41283)
Joachim Wiesemann <gnu@jwiesemann.com>
parents:
17885
diff
changeset
|
841 {@updateline, hlegend, linelength, false}); |
21904
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
842 addlistener (hplt, "marker", |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
843 {@updateline, hlegend, linelength, false}); |
21904
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
844 addlistener (hplt, "markeredgecolor", |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
845 {@updateline, hlegend, linelength, false}); |
21904
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
846 addlistener (hplt, "markerfacecolor", |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
847 {@updateline, hlegend, linelength, false}); |
21904
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
848 addlistener (hplt, "markersize", |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
849 {@updateline, hlegend, linelength, false}); |
21904
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
850 addlistener (hplt, "displayname", |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
851 {@updateline, hlegend, linelength, true}); |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
852 endif |
17503
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
853 |
17174
c3c1ebfaa7dc
maint: Use common indentation for switch statement.
Rik <rik@octave.org>
parents:
17125
diff
changeset
|
854 case "patch" |
21904
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
855 facecolor = get (hplt, "facecolor"); |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
856 edgecolor = get (hplt, "edgecolor"); |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
857 cdata = get (hplt, "cdata"); |
17174
c3c1ebfaa7dc
maint: Use common indentation for switch statement.
Rik <rik@octave.org>
parents:
17125
diff
changeset
|
858 if (! strcmp (facecolor, "none") || ! strcmp (edgecolor, "none")) |
c3c1ebfaa7dc
maint: Use common indentation for switch statement.
Rik <rik@octave.org>
parents:
17125
diff
changeset
|
859 p1 = patch ("xdata", ([0, linelength, linelength, 0] + |
17536
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
860 xoffset + xk * xstep) / lpos(3), |
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
861 "ydata", (lpos(4) - yoffset - |
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
862 [yk-0.3, yk-0.3, yk+0.3, yk+0.3] .* ystep) / lpos(4), |
18564
3a1a4d587c4e
legend.m: Correctly create legend for scatter plots (bug #33463).
Rik <rik@octave.org>
parents:
18423
diff
changeset
|
863 "facecolor", facecolor, "edgecolor", edgecolor, |
21904
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
864 "cdata", cdata, "userdata", hplt); |
18564
3a1a4d587c4e
legend.m: Correctly create legend for scatter plots (bug #33463).
Rik <rik@octave.org>
parents:
18423
diff
changeset
|
865 else |
3a1a4d587c4e
legend.m: Correctly create legend for scatter plots (bug #33463).
Rik <rik@octave.org>
parents:
18423
diff
changeset
|
866 ## non-standard patch only making use of marker styles |
3a1a4d587c4e
legend.m: Correctly create legend for scatter plots (bug #33463).
Rik <rik@octave.org>
parents:
18423
diff
changeset
|
867 ## such as scatter plot. |
3a1a4d587c4e
legend.m: Correctly create legend for scatter plots (bug #33463).
Rik <rik@octave.org>
parents:
18423
diff
changeset
|
868 p1 = patch ("xdata", (xoffset + 0.5 * linelength + xk * xstep) / lpos(3), |
3a1a4d587c4e
legend.m: Correctly create legend for scatter plots (bug #33463).
Rik <rik@octave.org>
parents:
18423
diff
changeset
|
869 "ydata", (lpos(4) - yoffset - yk * ystep) / lpos(4), |
21904
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
870 "marker", get (hplt, "marker"), |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
871 "markeredgecolor",get (hplt,"markeredgecolor"), |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
872 "markerfacecolor",get (hplt,"markerfacecolor"), |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
873 "markersize", min (get (hplt,"markersize"),10), |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
874 "cdata", cdata, "userdata", hplt); |
17174
c3c1ebfaa7dc
maint: Use common indentation for switch statement.
Rik <rik@octave.org>
parents:
17125
diff
changeset
|
875 endif |
18564
3a1a4d587c4e
legend.m: Correctly create legend for scatter plots (bug #33463).
Rik <rik@octave.org>
parents:
18423
diff
changeset
|
876 hobjects(end+1) = p1; |
3a1a4d587c4e
legend.m: Correctly create legend for scatter plots (bug #33463).
Rik <rik@octave.org>
parents:
18423
diff
changeset
|
877 ## Copy clim from axes so that colors work out. |
3a1a4d587c4e
legend.m: Correctly create legend for scatter plots (bug #33463).
Rik <rik@octave.org>
parents:
18423
diff
changeset
|
878 set (hlegend, "clim", get (ca(1), "clim")); |
3a1a4d587c4e
legend.m: Correctly create legend for scatter plots (bug #33463).
Rik <rik@octave.org>
parents:
18423
diff
changeset
|
879 |
3a1a4d587c4e
legend.m: Correctly create legend for scatter plots (bug #33463).
Rik <rik@octave.org>
parents:
18423
diff
changeset
|
880 ## FIXME: Need listeners, as for line objects. |
17730
580990c2ce04
legend.m: Fix legend color for bar graphs (bug #40327)
Rik <rik@octave.org>
parents:
17677
diff
changeset
|
881 ## Changing clim, for example, won't update colors |
17503
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
882 |
17174
c3c1ebfaa7dc
maint: Use common indentation for switch statement.
Rik <rik@octave.org>
parents:
17125
diff
changeset
|
883 case "surface" |
21904
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
884 facecolor = get (hplt, "facecolor"); |
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
885 edgecolor = get (hplt, "edgecolor"); |
17560
225ec9a0222a
legend.m: Use axis that legend refers to when calculating color for surface patch label.
Rik <rik@octave.org>
parents:
17540
diff
changeset
|
886 cdata = sum (get (ca(1), "clim")) / 2; |
17540
b7aa1d726bcc
legend.m: Add support for surface objects.
Rik <rik@octave.org>
parents:
17538
diff
changeset
|
887 if (! strcmp (facecolor, "none") || ! strcmp (edgecolor, "none")) |
b7aa1d726bcc
legend.m: Add support for surface objects.
Rik <rik@octave.org>
parents:
17538
diff
changeset
|
888 p1 = patch ("xdata", ([0, linelength, linelength, 0] + |
b7aa1d726bcc
legend.m: Add support for surface objects.
Rik <rik@octave.org>
parents:
17538
diff
changeset
|
889 xoffset + xk * xstep) / lpos(3), |
b7aa1d726bcc
legend.m: Add support for surface objects.
Rik <rik@octave.org>
parents:
17538
diff
changeset
|
890 "ydata", (lpos(4) - yoffset - |
b7aa1d726bcc
legend.m: Add support for surface objects.
Rik <rik@octave.org>
parents:
17538
diff
changeset
|
891 [yk-0.3, yk-0.3, yk+0.3, yk+0.3] .* ystep) / lpos(4), |
18564
3a1a4d587c4e
legend.m: Correctly create legend for scatter plots (bug #33463).
Rik <rik@octave.org>
parents:
18423
diff
changeset
|
892 "facecolor", facecolor, "edgecolor", edgecolor, |
21904
7aa8d9c28d2b
legend.m: Return the correct third argument (h_plots) when plot has hggroups (bug #48210).
Rik <rik@octave.org>
parents:
21898
diff
changeset
|
893 "cdata", cdata, "userdata", hplt); |
17540
b7aa1d726bcc
legend.m: Add support for surface objects.
Rik <rik@octave.org>
parents:
17538
diff
changeset
|
894 hobjects(end+1) = p1; |
b7aa1d726bcc
legend.m: Add support for surface objects.
Rik <rik@octave.org>
parents:
17538
diff
changeset
|
895 endif |
18564
3a1a4d587c4e
legend.m: Correctly create legend for scatter plots (bug #33463).
Rik <rik@octave.org>
parents:
18423
diff
changeset
|
896 ## FIXME: Need listeners, as for line objects. |
17503
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
897 |
10999
9f45b76c16e3
legend.m: Treat line, patch, and surface objects differetly.
Ben Abbott <bpabbott@mac.com>
parents:
10995
diff
changeset
|
898 endswitch |
17503
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
899 |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
900 set (texthandle(k), "position", |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
901 [(txoffset + xk * xstep) / lpos(3), ... |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
902 (lpos(4) - yoffset - yk * ystep) / lpos(4)]); |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
903 if (strcmp (orientation, "vertical")) |
20735
418ae0cb752f
Replace ++,-- with in-place operators for performance.
Rik <rik@octave.org>
parents:
20711
diff
changeset
|
904 yk += 1; |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
905 if (yk > num1) |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
906 yk = 0; |
20735
418ae0cb752f
Replace ++,-- with in-place operators for performance.
Rik <rik@octave.org>
parents:
20711
diff
changeset
|
907 xk += 1; |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
908 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
909 else |
20735
418ae0cb752f
Replace ++,-- with in-place operators for performance.
Rik <rik@octave.org>
parents:
20711
diff
changeset
|
910 xk += 1; |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
911 if (xk > num1) |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
912 xk = 0; |
20735
418ae0cb752f
Replace ++,-- with in-place operators for performance.
Rik <rik@octave.org>
parents:
20711
diff
changeset
|
913 yk += 1; |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
914 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
915 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
916 endfor |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
917 |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
918 ## Add an invisible text object to original axis |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
919 ## that when it is destroyed will remove the legend |
22054
55e2979e1fd1
legend.m: Don't use 'legend' tag for any non-axes, non-legend objects.
Rik <rik@octave.org>
parents:
21937
diff
changeset
|
920 props = {"parent", ca(1), "tag", "deletelegend", ... |
16799
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
921 "handlevisibility", "off", "visible", "off", ... |
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
922 "xliminclude", "off", "yliminclude", "off"}; |
22054
55e2979e1fd1
legend.m: Don't use 'legend' tag for any non-axes, non-legend objects.
Rik <rik@octave.org>
parents:
21937
diff
changeset
|
923 t1 = findall (ca(1), "tag", "deletelegend", "type", "text"); |
16799
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
924 if (isempty (t1)) |
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
925 t1 = text (0, 0, "", props{:}); |
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
926 set (t1, "deletefcn", {@deletelegend1, hlegend}); |
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
927 endif |
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
928 if (isprop (hlegend, "unmodified_axes_position")) |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
929 set (hlegend, "unmodified_axes_position", |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
930 unmodified_axes_position, |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
931 "unmodified_axes_outerposition", |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
932 unmodified_axes_outerposition); |
16799
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
933 else |
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
934 addproperty ("unmodified_axes_position", hlegend, |
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
935 "data", unmodified_axes_position); |
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
936 addproperty ("unmodified_axes_outerposition", hlegend, |
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
937 "data", unmodified_axes_outerposition); |
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
938 endif |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
939 |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
940 ## Resize the axis that the legend is attached to if the legend is |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
941 ## "outside" the plot and create a listener to resize axis to original |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
942 ## size if the legend is deleted, hidden, or shown. |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
943 if (outside) |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
944 for i = 1 : numel (ca) |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
945 units = get (ca(i), "units"); |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
946 unwind_protect |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
947 set (ca(i), "units", "points"); |
16909
8f9ed9d8a478
Allow gnuplot to handle keybox and axes positioning.
Ben Abbott <bpabbott@mac.com>
parents:
16908
diff
changeset
|
948 if (gnuplot && numel (ca) == 1) |
8f9ed9d8a478
Allow gnuplot to handle keybox and axes positioning.
Ben Abbott <bpabbott@mac.com>
parents:
16908
diff
changeset
|
949 ## Let Gnuplot handle the positioning of the keybox. |
8f9ed9d8a478
Allow gnuplot to handle keybox and axes positioning.
Ben Abbott <bpabbott@mac.com>
parents:
16908
diff
changeset
|
950 ## This violates strict Matlab compatibility, but reliably |
8f9ed9d8a478
Allow gnuplot to handle keybox and axes positioning.
Ben Abbott <bpabbott@mac.com>
parents:
16908
diff
changeset
|
951 ## renders an esthetic result. |
8f9ed9d8a478
Allow gnuplot to handle keybox and axes positioning.
Ben Abbott <bpabbott@mac.com>
parents:
16908
diff
changeset
|
952 set (ca(i), "position", unmodified_axes_position); |
21385
89fa0694aa2e
Fix check-missing-semicolon QA target (bug #47277).
Rik <rik@octave.org>
parents:
20852
diff
changeset
|
953 set (ca(i), "activepositionproperty", "outerposition"); |
16909
8f9ed9d8a478
Allow gnuplot to handle keybox and axes positioning.
Ben Abbott <bpabbott@mac.com>
parents:
16908
diff
changeset
|
954 else |
8f9ed9d8a478
Allow gnuplot to handle keybox and axes positioning.
Ben Abbott <bpabbott@mac.com>
parents:
16908
diff
changeset
|
955 ## numel (ca) > 1 for axes overlays (like plotyy) |
8f9ed9d8a478
Allow gnuplot to handle keybox and axes positioning.
Ben Abbott <bpabbott@mac.com>
parents:
16908
diff
changeset
|
956 set (ca(i), "position", new_pos); |
8f9ed9d8a478
Allow gnuplot to handle keybox and axes positioning.
Ben Abbott <bpabbott@mac.com>
parents:
16908
diff
changeset
|
957 endif |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
958 unwind_protect_cleanup |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
959 set (ca(i), "units", units); |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
960 end_unwind_protect |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
961 endfor |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
962 |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
963 set (hlegend, "deletefcn", {@deletelegend2, ca, ... |
16799
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
964 unmodified_axes_position, ... |
16909
8f9ed9d8a478
Allow gnuplot to handle keybox and axes positioning.
Ben Abbott <bpabbott@mac.com>
parents:
16908
diff
changeset
|
965 unmodified_axes_outerposition, ... |
8f9ed9d8a478
Allow gnuplot to handle keybox and axes positioning.
Ben Abbott <bpabbott@mac.com>
parents:
16908
diff
changeset
|
966 t1, hplots}); |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
967 addlistener (hlegend, "visible", {@hideshowlegend, ca, ... |
16909
8f9ed9d8a478
Allow gnuplot to handle keybox and axes positioning.
Ben Abbott <bpabbott@mac.com>
parents:
16908
diff
changeset
|
968 unmodified_axes_position, ... |
8f9ed9d8a478
Allow gnuplot to handle keybox and axes positioning.
Ben Abbott <bpabbott@mac.com>
parents:
16908
diff
changeset
|
969 new_pos}); |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
970 else |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
971 set (hlegend, "deletefcn", {@deletelegend2, ca, [], [], t1, hplots}); |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
972 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
973 |
17503
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
974 if (! addprops) |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
975 ## Remove listeners on existing legend temporarily to stop recursion. |
17536
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
976 dellistener (hlegend, "location"); |
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
977 dellistener (hlegend, "orientation"); |
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
978 dellistener (hlegend, "string"); |
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
979 dellistener (hlegend, "textposition"); |
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
980 endif |
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
981 |
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
982 if (! addprops) |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
983 set (hlegend, "string", text_strings); |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
984 endif |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
985 |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
986 if (outside) |
17503
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
987 set (hlegend, "location", [location "outside"], |
17536
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
988 "orientation", orientation, "textposition", textpos); |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
989 else |
16796
519343308ab1
Rename "position" variable to "location" in legend.m
Ben Abbott <bpabbott@mac.com>
parents:
16795
diff
changeset
|
990 set (hlegend, "location", location, "orientation", orientation, |
17536
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
991 "textposition", textpos); |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
992 endif |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
993 |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
994 if (addprops) |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
995 addlistener (hlegend, "edgecolor", @updatelegendtext); |
17533
bb7756dff055
legend.m: Add listeners for all font properties to update text labels.
Rik <rik@octave.org>
parents:
17532
diff
changeset
|
996 addlistener (hlegend, "fontangle", @updatelegendtext); |
bb7756dff055
legend.m: Add listeners for all font properties to update text labels.
Rik <rik@octave.org>
parents:
17532
diff
changeset
|
997 addlistener (hlegend, "fontname", @updatelegendtext); |
bb7756dff055
legend.m: Add listeners for all font properties to update text labels.
Rik <rik@octave.org>
parents:
17532
diff
changeset
|
998 addlistener (hlegend, "fontweight", @updatelegendtext); |
17536
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
999 addlistener (hlegend, "textcolor", @updatelegendtext); |
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
1000 ## Properties which could change size of box, such as fontsize, |
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
1001 ## require legend to be redrawn. |
17885
1d109119ac71
legend.m: Don't add listener for 'fontsize' if using gnuplot.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1002 ## FIXME: fontsize is changed by print.m function during the |
1d109119ac71
legend.m: Don't add listener for 'fontsize' if using gnuplot.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1003 ## production of a plot for output. This screws things up |
1d109119ac71
legend.m: Don't add listener for 'fontsize' if using gnuplot.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1004 ## because legend tries to return the axes size to what it |
1d109119ac71
legend.m: Don't add listener for 'fontsize' if using gnuplot.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1005 ## was when the figure was created, versus what it is now |
1d109119ac71
legend.m: Don't add listener for 'fontsize' if using gnuplot.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1006 ## when the figure is being printed. Temporary hack is |
1d109119ac71
legend.m: Don't add listener for 'fontsize' if using gnuplot.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1007 ## good enough for generating the Octave manual which still |
1d109119ac71
legend.m: Don't add listener for 'fontsize' if using gnuplot.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1008 ## relies on gnuplot for generating images. See bug #40333. |
1d109119ac71
legend.m: Don't add listener for 'fontsize' if using gnuplot.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1009 if (! gnuplot) |
1d109119ac71
legend.m: Don't add listener for 'fontsize' if using gnuplot.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1010 addlistener (hlegend, "fontsize", @updatelegend); |
1d109119ac71
legend.m: Don't add listener for 'fontsize' if using gnuplot.
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
1011 endif |
17536
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
1012 addlistener (hlegend, "fontunits", @updatelegend); |
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
1013 addlistener (hlegend, "interpreter", @updatelegend); |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1014 addlistener (hlegend, "location", @updatelegend); |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1015 addlistener (hlegend, "orientation", @updatelegend); |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1016 addlistener (hlegend, "string", @updatelegend); |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1017 addlistener (hlegend, "textposition", @updatelegend); |
17536
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
1018 ## FIXME: need to add listeners for tightinset and position |
16910
8a4e53cf79c9
Modify the plotbox position relative to the keybox position.
Ben Abbott <bpabbott@mac.com>
parents:
16909
diff
changeset
|
1019 ## addlistener (ca, "tightinset", @update????); |
8a4e53cf79c9
Modify the plotbox position relative to the keybox position.
Ben Abbott <bpabbott@mac.com>
parents:
16909
diff
changeset
|
1020 ## addlistener (ca, "position", @update????); |
17536
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
1021 else |
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
1022 ## Restore certain listeners |
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
1023 addlistener (hlegend, "location", @updatelegend); |
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
1024 addlistener (hlegend, "orientation", @updatelegend); |
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
1025 addlistener (hlegend, "string", @updatelegend); |
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
1026 addlistener (hlegend, "textposition", @updatelegend); |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1027 endif |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1028 unwind_protect_cleanup |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1029 set (fig, "currentaxes", curaxes); |
18647
ce36233e4849
legend.m: Correctly handle axis handle as first argument (bug #42035).
Rik <rik@octave.org>
parents:
18644
diff
changeset
|
1030 if (! isempty (oldfig)) |
ce36233e4849
legend.m: Correctly handle axis handle as first argument (bug #42035).
Rik <rik@octave.org>
parents:
18644
diff
changeset
|
1031 set (0, "currentfigure", oldfig); |
ce36233e4849
legend.m: Correctly handle axis handle as first argument (bug #42035).
Rik <rik@octave.org>
parents:
18644
diff
changeset
|
1032 endif |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1033 end_unwind_protect |
6272 | 1034 endif |
6147 | 1035 endif |
1036 | |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1037 if (nargout > 0) |
17503
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
1038 hleg = hlegend; |
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
1039 hleg_obj = hobjects; |
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
1040 hplot = hplots; |
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
1041 labels = text_strings; |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1042 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1043 |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1044 endfunction |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1045 |
17503
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
1046 function updatelegend (h, ~) |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1047 persistent recursive = false; |
16805
2281d957cde6
legend.m: Tweak code for Octave coding conventions.
Rik <rik@octave.org>
parents:
16800
diff
changeset
|
1048 |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1049 if (! recursive) |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1050 recursive = true; |
12339
eda5eabd5d0b
Fix for inline legends (#32022, #32343)
David Bateman <dbateman@free.fr>
parents:
11587
diff
changeset
|
1051 unwind_protect |
eda5eabd5d0b
Fix for inline legends (#32022, #32343)
David Bateman <dbateman@free.fr>
parents:
11587
diff
changeset
|
1052 hax = getfield (get (h, "userdata"), "handle"); |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
1053 [hplots, ~] = __getlegenddata__ (h); |
16799
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
1054 position = get (h, "unmodified_axes_position"); |
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
1055 outerposition = get (h, "unmodified_axes_outerposition"); |
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
1056 units = get (hax, "units"); |
16805
2281d957cde6
legend.m: Tweak code for Octave coding conventions.
Rik <rik@octave.org>
parents:
16800
diff
changeset
|
1057 set (hax, "units", "points"); |
16933
e39f00a32dc7
maint: Use parentheses around condition for switch(),while(),if() statements.
Rik <rik@octave.org>
parents:
16921
diff
changeset
|
1058 switch (get (hax, "activepositionproperty")) |
17174
c3c1ebfaa7dc
maint: Use common indentation for switch statement.
Rik <rik@octave.org>
parents:
17125
diff
changeset
|
1059 case "position" |
c3c1ebfaa7dc
maint: Use common indentation for switch statement.
Rik <rik@octave.org>
parents:
17125
diff
changeset
|
1060 set (hax, "outerposition", outerposition); |
c3c1ebfaa7dc
maint: Use common indentation for switch statement.
Rik <rik@octave.org>
parents:
17125
diff
changeset
|
1061 set (hax, "position", position); |
c3c1ebfaa7dc
maint: Use common indentation for switch statement.
Rik <rik@octave.org>
parents:
17125
diff
changeset
|
1062 case "outerposition" |
c3c1ebfaa7dc
maint: Use common indentation for switch statement.
Rik <rik@octave.org>
parents:
17125
diff
changeset
|
1063 set (hax, "position", position); |
c3c1ebfaa7dc
maint: Use common indentation for switch statement.
Rik <rik@octave.org>
parents:
17125
diff
changeset
|
1064 set (hax, "outerposition", outerposition); |
16799
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
1065 endswitch |
20781
d02ffc87d9ee
avoid crash in legend function (bug #46561)
John W. Eaton <jwe@octave.org>
parents:
20735
diff
changeset
|
1066 set (hax, "units", units); |
18644
8c0646dd9e5a
legend.m: Fix bug updating plotyy figures (bug #41970).
Rik <rik@octave.org>
parents:
18564
diff
changeset
|
1067 |
8c0646dd9e5a
legend.m: Fix bug updating plotyy figures (bug #41970).
Rik <rik@octave.org>
parents:
18564
diff
changeset
|
1068 h = legend (hax(1), hplots, get (h, "string")); |
12339
eda5eabd5d0b
Fix for inline legends (#32022, #32343)
David Bateman <dbateman@free.fr>
parents:
11587
diff
changeset
|
1069 unwind_protect_cleanup |
eda5eabd5d0b
Fix for inline legends (#32022, #32343)
David Bateman <dbateman@free.fr>
parents:
11587
diff
changeset
|
1070 recursive = false; |
eda5eabd5d0b
Fix for inline legends (#32022, #32343)
David Bateman <dbateman@free.fr>
parents:
11587
diff
changeset
|
1071 end_unwind_protect |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1072 endif |
16805
2281d957cde6
legend.m: Tweak code for Octave coding conventions.
Rik <rik@octave.org>
parents:
16800
diff
changeset
|
1073 |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1074 endfunction |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1075 |
17503
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
1076 function updatelegendtext (h, ~) |
21758
ffad2baa90f7
maint: Use newlines to make code more readable.
Rik <rik@octave.org>
parents:
21751
diff
changeset
|
1077 |
17536
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
1078 kids = get (h, "children"); |
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
1079 htext = []; |
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
1080 for i = 1:numel (kids) |
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
1081 if (strcmp (get (kids(i), "type"), "text")) |
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
1082 htext(end+1) = kids(i); |
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
1083 endif |
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
1084 endfor |
17533
bb7756dff055
legend.m: Add listeners for all font properties to update text labels.
Rik <rik@octave.org>
parents:
17532
diff
changeset
|
1085 |
17536
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
1086 tprops = {"fontangle", "fontname", "fontweight", "color"}; |
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
1087 lprops = {"fontangle", "fontname", "fontweight", "textcolor"}; |
17533
bb7756dff055
legend.m: Add listeners for all font properties to update text labels.
Rik <rik@octave.org>
parents:
17532
diff
changeset
|
1088 set (htext, tprops, get (h, lprops)); |
17535
5eae41c8c07f
legend.m: Add support for "edgecolor" property.
Rik <rik@octave.org>
parents:
17534
diff
changeset
|
1089 |
5eae41c8c07f
legend.m: Add support for "edgecolor" property.
Rik <rik@octave.org>
parents:
17534
diff
changeset
|
1090 ec = get (h, "edgecolor"); |
5eae41c8c07f
legend.m: Add support for "edgecolor" property.
Rik <rik@octave.org>
parents:
17534
diff
changeset
|
1091 set (h, "xcolor", ec, "ycolor", ec); |
21758
ffad2baa90f7
maint: Use newlines to make code more readable.
Rik <rik@octave.org>
parents:
21751
diff
changeset
|
1092 |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1093 endfunction |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1094 |
17503
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
1095 function hideshowlegend (h, ~, ca, pos1, pos2) |
21758
ffad2baa90f7
maint: Use newlines to make code more readable.
Rik <rik@octave.org>
parents:
21751
diff
changeset
|
1096 |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1097 isvisible = strcmp (get (h, "visible"), "off"); |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1098 if (! isvisible) |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1099 kids = get (h, "children"); |
17503
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
1100 if (any (! strcmp (get (kids, "visible"), "off"))) |
17533
bb7756dff055
legend.m: Add listeners for all font properties to update text labels.
Rik <rik@octave.org>
parents:
17532
diff
changeset
|
1101 isvisible = true; |
17503
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
1102 endif |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1103 endif |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1104 |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1105 for i = 1 : numel (ca) |
17125
b5d6314314fc
Change various plot functions to take advantage of new isaxes() function.
Rik <rik@octave.org>
parents:
17122
diff
changeset
|
1106 if (isaxes (ca(i)) |
14846
460a3c6d8bf1
maint: Use Octave coding convention for cuddled parenthis in function calls with empty argument lists.
Rik <octave@nomad.inbox5.com>
parents:
14755
diff
changeset
|
1107 && (isempty (gcbf ()) || strcmp (get (gcbf (), "beingdeleted"),"off")) |
11149
fe3c3dfc07eb
style fix: break lines before && and ||, not after
John W. Eaton <jwe@octave.org>
parents:
11134
diff
changeset
|
1108 && strcmp (get (ca(i), "beingdeleted"), "off")) |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1109 units = get (ca(i), "units"); |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1110 unwind_protect |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1111 set (ca(i), "units", "points"); |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1112 if (isvisible) |
12440
2ed62b9f949e
synchronization of axes position and outerposition
Konstantinos Poulios <logari81@googlemail.com>
parents:
12437
diff
changeset
|
1113 set (ca(i), "position", pos2); |
10990
529b36293297
Backed out changeset 6ea65c5de87a
David Bateman <dbateman@free.fr>
parents:
10989
diff
changeset
|
1114 else |
12440
2ed62b9f949e
synchronization of axes position and outerposition
Konstantinos Poulios <logari81@googlemail.com>
parents:
12437
diff
changeset
|
1115 set (ca(i), "position", pos1); |
10990
529b36293297
Backed out changeset 6ea65c5de87a
David Bateman <dbateman@free.fr>
parents:
10989
diff
changeset
|
1116 endif |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1117 unwind_protect_cleanup |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1118 set (ca(i), "units", units); |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1119 end_unwind_protect |
10990
529b36293297
Backed out changeset 6ea65c5de87a
David Bateman <dbateman@free.fr>
parents:
10989
diff
changeset
|
1120 endif |
529b36293297
Backed out changeset 6ea65c5de87a
David Bateman <dbateman@free.fr>
parents:
10989
diff
changeset
|
1121 endfor |
21758
ffad2baa90f7
maint: Use newlines to make code more readable.
Rik <rik@octave.org>
parents:
21751
diff
changeset
|
1122 |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1123 endfunction |
10989
6ea65c5de87a
Respect the units and paperunits figure properties and the units and fontunits axes properties
David Bateman <dbateman@free.fr>
parents:
10949
diff
changeset
|
1124 |
21652
2e07dcdc6139
legend.m: Check handle is valid before delete (partial fix bug #47699).
Rik <rik@octave.org>
parents:
21580
diff
changeset
|
1125 function deletelegend1 (h, ~, hlegend) |
2e07dcdc6139
legend.m: Check handle is valid before delete (partial fix bug #47699).
Rik <rik@octave.org>
parents:
21580
diff
changeset
|
1126 if (isaxes (hlegend) |
15440
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
1127 && (isempty (gcbf ()) || strcmp (get (gcbf (), "beingdeleted"), "off")) |
21652
2e07dcdc6139
legend.m: Check handle is valid before delete (partial fix bug #47699).
Rik <rik@octave.org>
parents:
21580
diff
changeset
|
1128 && strcmp (get (hlegend, "beingdeleted"), "off")) |
2e07dcdc6139
legend.m: Check handle is valid before delete (partial fix bug #47699).
Rik <rik@octave.org>
parents:
21580
diff
changeset
|
1129 delete (hlegend); |
10989
6ea65c5de87a
Respect the units and paperunits figure properties and the units and fontunits axes properties
David Bateman <dbateman@free.fr>
parents:
10949
diff
changeset
|
1130 endif |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1131 endfunction |
10989
6ea65c5de87a
Respect the units and paperunits figure properties and the units and fontunits axes properties
David Bateman <dbateman@free.fr>
parents:
10949
diff
changeset
|
1132 |
17503
d99785217634
legend.m: Text objects should inherit textcolor, interpreter properties from legend (bug #40064).
Rik <rik@octave.org>
parents:
17281
diff
changeset
|
1133 function deletelegend2 (h, ~, ca, pos, outpos, t1, hplots) |
21758
ffad2baa90f7
maint: Use newlines to make code more readable.
Rik <rik@octave.org>
parents:
21751
diff
changeset
|
1134 |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1135 for i = 1 : numel (ca) |
17125
b5d6314314fc
Change various plot functions to take advantage of new isaxes() function.
Rik <rik@octave.org>
parents:
17122
diff
changeset
|
1136 if (isaxes (ca(i)) |
15440
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
1137 && (isempty (gcbf ()) || strcmp (get (gcbf (), "beingdeleted"), "off")) |
11149
fe3c3dfc07eb
style fix: break lines before && and ||, not after
John W. Eaton <jwe@octave.org>
parents:
11134
diff
changeset
|
1138 && strcmp (get (ca(i), "beingdeleted"), "off")) |
17536
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
1139 if (! isempty (pos) && ! isempty (outpos)) |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1140 units = get (ca(i), "units"); |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1141 unwind_protect |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1142 set (ca(i), "units", "points"); |
12440
2ed62b9f949e
synchronization of axes position and outerposition
Konstantinos Poulios <logari81@googlemail.com>
parents:
12437
diff
changeset
|
1143 set (ca(i), "position", pos, "deletefcn", ""); |
10995
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1144 unwind_protect_cleanup |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1145 set (ca(i), "units", units); |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1146 end_unwind_protect |
e81914f3921f
Update legend code to support fltk (fixes #29348 and partially fixes #30461)
David Bateman <dbateman@free.fr>
parents:
10990
diff
changeset
|
1147 endif |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1148 endif |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1149 endfor |
21758
ffad2baa90f7
maint: Use newlines to make code more readable.
Rik <rik@octave.org>
parents:
21751
diff
changeset
|
1150 |
21652
2e07dcdc6139
legend.m: Check handle is valid before delete (partial fix bug #47699).
Rik <rik@octave.org>
parents:
21580
diff
changeset
|
1151 if (ishandle (t1)) |
2e07dcdc6139
legend.m: Check handle is valid before delete (partial fix bug #47699).
Rik <rik@octave.org>
parents:
21580
diff
changeset
|
1152 set (t1, "deletefcn", ""); |
2e07dcdc6139
legend.m: Check handle is valid before delete (partial fix bug #47699).
Rik <rik@octave.org>
parents:
21580
diff
changeset
|
1153 delete (t1); |
2e07dcdc6139
legend.m: Check handle is valid before delete (partial fix bug #47699).
Rik <rik@octave.org>
parents:
21580
diff
changeset
|
1154 endif |
21758
ffad2baa90f7
maint: Use newlines to make code more readable.
Rik <rik@octave.org>
parents:
21751
diff
changeset
|
1155 |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1156 for i = 1 : numel (hplots) |
17536
8a186cd5b9a6
legend.m: Updating of font properties which affect box size, now redraws correctly sized legend.
Rik <rik@octave.org>
parents:
17535
diff
changeset
|
1157 if (ishandle (hplots(i)) && strcmp (get (hplots(i), "type"), "line")) |
15440
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
1158 dellistener (hplots(i), "color"); |
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
1159 dellistener (hplots(i), "linestyle"); |
18422
be3702a2eb8a
legend.m: use linewidth from plot object in drawing legend (bug #41283)
Joachim Wiesemann <gnu@jwiesemann.com>
parents:
17885
diff
changeset
|
1160 dellistener (hplots(i), "linewidth"); |
15440
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
1161 dellistener (hplots(i), "marker"); |
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
1162 dellistener (hplots(i), "markeredgecolor"); |
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
1163 dellistener (hplots(i), "markerfacecolor"); |
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
1164 dellistener (hplots(i), "markersize"); |
1db706430c96
Fix legend ('show') to work with DisplayName (bug #33757)
Rik <rik@octave.org>
parents:
15202
diff
changeset
|
1165 dellistener (hplots(i), "displayname"); |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1166 endif |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1167 endfor |
21758
ffad2baa90f7
maint: Use newlines to make code more readable.
Rik <rik@octave.org>
parents:
21751
diff
changeset
|
1168 |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1169 endfunction |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1170 |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
1171 function updateline (h, ~, hlegend, linelength, update_name) |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1172 |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
1173 if (update_name) |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
1174 ## When string changes, have to rebuild legend completely |
12339
eda5eabd5d0b
Fix for inline legends (#32022, #32343)
David Bateman <dbateman@free.fr>
parents:
11587
diff
changeset
|
1175 [hplots, text_strings] = __getlegenddata__ (hlegend); |
18647
ce36233e4849
legend.m: Correctly handle axis handle as first argument (bug #42035).
Rik <rik@octave.org>
parents:
18644
diff
changeset
|
1176 legend (get (hplots(1), "parent"), hplots, text_strings); |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1177 else |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
1178 kids = get (hlegend, "children"); |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
1179 ll = lm = []; |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
1180 for i = 1 : numel (kids) |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
1181 if (get (kids(i), "userdata") == h |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
1182 && strcmp (get (kids(i), "type"), "line")) |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
1183 if (strcmp (get (kids(i), "marker"), "none")) |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
1184 ll = kids(i); |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
1185 else |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
1186 lm = kids(i); |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
1187 endif |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
1188 endif |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
1189 endfor |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
1190 |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
1191 [linestyle, marker, displayname] = ... |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
1192 get (h, {"linestyle", "marker", "displayname"}){:}; |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
1193 |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1194 if (! isempty (ll)) |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
1195 [xpos1, ypos1] = get (ll, {"xdata", "ydata"}){:}; |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
1196 xpos2 = sum (xpos1) / 2; |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1197 ypos2 = ypos1(1); |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1198 delete (ll); |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1199 if (! isempty (lm)) |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1200 delete (lm); |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1201 endif |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1202 else |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
1203 [xpos2, ypos2] = get (lm, {"xdata", "ydata"}){:}; |
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
1204 xpos1 = xpos2 + [-0.5, 0.5] * linelength; |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1205 ypos1 = [ypos2, ypos2]; |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1206 delete (lm); |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1207 endif |
17537
4f57d4de0383
legend.m: Implement correct listener for DisplayName on line objects.
Rik <rik@octave.org>
parents:
17536
diff
changeset
|
1208 |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1209 if (! strcmp (linestyle, "none")) |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11563
diff
changeset
|
1210 line ("xdata", xpos1, "ydata", ypos1, "color", get (h, "color"), |
18422
be3702a2eb8a
legend.m: use linewidth from plot object in drawing legend (bug #41283)
Joachim Wiesemann <gnu@jwiesemann.com>
parents:
17885
diff
changeset
|
1211 "linestyle", get (h, "linestyle"), |
be3702a2eb8a
legend.m: use linewidth from plot object in drawing legend (bug #41283)
Joachim Wiesemann <gnu@jwiesemann.com>
parents:
17885
diff
changeset
|
1212 "linewidth", min (get (h, "linewidth"), 5), |
be3702a2eb8a
legend.m: use linewidth from plot object in drawing legend (bug #41283)
Joachim Wiesemann <gnu@jwiesemann.com>
parents:
17885
diff
changeset
|
1213 "marker", "none", |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1214 "userdata", h, "parent", hlegend); |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1215 endif |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1216 if (! strcmp (marker, "none")) |
11587
c792872f8942
all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents:
11563
diff
changeset
|
1217 line ("xdata", xpos2, "ydata", ypos2, "color", get (h, "color"), |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1218 "marker", marker, "markeredgecolor", get (h, "markeredgecolor"), |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1219 "markerfacecolor", get (h, "markerfacecolor"), |
18423
1597281144e4
legend.m: Restrict maximum marker size to avoid overflowing visual area.
Rik <rik@octave.org>
parents:
18422
diff
changeset
|
1220 "markersize", min (get (h, "markersize"), 10), |
18422
be3702a2eb8a
legend.m: use linewidth from plot object in drawing legend (bug #41283)
Joachim Wiesemann <gnu@jwiesemann.com>
parents:
17885
diff
changeset
|
1221 "linestyle", "none", |
be3702a2eb8a
legend.m: use linewidth from plot object in drawing legend (bug #41283)
Joachim Wiesemann <gnu@jwiesemann.com>
parents:
17885
diff
changeset
|
1222 "linewidth", min (get (h, "linewidth"), 5), |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1223 "userdata", h, "parent", hlegend); |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1224 endif |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1225 endif |
21758
ffad2baa90f7
maint: Use newlines to make code more readable.
Rik <rik@octave.org>
parents:
21751
diff
changeset
|
1226 |
11198
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1227 endfunction |
9f080d23396f
Fix multi-parented legends with the gnuplot backend (fixes #30461 and #31522)
David Bateman <dbateman@free.fr>
parents:
11149
diff
changeset
|
1228 |
16805
2281d957cde6
legend.m: Tweak code for Octave coding conventions.
Rik <rik@octave.org>
parents:
16800
diff
changeset
|
1229 |
11418
a140991387fb
legend.m: Add demo to legend for inline key.
Ben Abbott <bpabbott@mac.com>
parents:
11363
diff
changeset
|
1230 %!demo |
16805
2281d957cde6
legend.m: Tweak code for Octave coding conventions.
Rik <rik@octave.org>
parents:
16800
diff
changeset
|
1231 %! clf; |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
1232 %! plot (rand (2)); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1233 %! title ("legend called with cellstr and string inputs for labels"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1234 %! h = legend ({"foo"}, "bar"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1235 %! legend (h, "location", "northeastoutside"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1236 %! set (h, "fontsize", 20); |
11462
aed2c50c3082
legend.m: legend with more than two inline keys (bug 31991). Add/modifyy demos.
Ben Abbott <bpabbott@mac.com>
parents:
11434
diff
changeset
|
1237 |
aed2c50c3082
legend.m: legend with more than two inline keys (bug 31991). Add/modifyy demos.
Ben Abbott <bpabbott@mac.com>
parents:
11434
diff
changeset
|
1238 %!demo |
16805
2281d957cde6
legend.m: Tweak code for Octave coding conventions.
Rik <rik@octave.org>
parents:
16800
diff
changeset
|
1239 %! clf; |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
1240 %! plot (rand (3)); |
20408
71bd638e0ef6
legend.m: Fix listeners on legend line objects (bug #45563).
Rik <rik@octave.org>
parents:
20286
diff
changeset
|
1241 %! title ('legend ("show") without inputs creates default labels'); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1242 %! h = legend ("show"); |
14236
35903f035390
Escaping strings for legend entries are handled by __go_draw_axes__.
Ben Abbott <bpabbott@mac.com>
parents:
14214
diff
changeset
|
1243 |
35903f035390
Escaping strings for legend entries are handled by __go_draw_axes__.
Ben Abbott <bpabbott@mac.com>
parents:
14214
diff
changeset
|
1244 %!demo |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1245 %! clf; |
11418
a140991387fb
legend.m: Add demo to legend for inline key.
Ben Abbott <bpabbott@mac.com>
parents:
11363
diff
changeset
|
1246 %! x = 0:1; |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1247 %! plot (x,x,";I am Blue;", x,2*x, x,3*x,";I am Red;"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1248 %! h = legend ("location", "northeastoutside"); |
16805
2281d957cde6
legend.m: Tweak code for Octave coding conventions.
Rik <rik@octave.org>
parents:
16800
diff
changeset
|
1249 %! ## Placing legend inside should return axes to original size |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1250 %! legend (h, "location", "northeast"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1251 %! title ("Blue and Red keys, with Green missing"); |
8343
9f34f7636fe0
legend.m: Correct ording of legend labels.
Ben Abbott <bpabbott@mac.com>
parents:
8291
diff
changeset
|
1252 |
9f34f7636fe0
legend.m: Correct ording of legend labels.
Ben Abbott <bpabbott@mac.com>
parents:
8291
diff
changeset
|
1253 %!demo |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1254 %! clf; |
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1255 %! plot (1:10, 1:10, 1:10, fliplr (1:10)); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1256 %! title ("incline is blue and decline is green"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1257 %! legend ({"I am blue", "I am green"}, "location", "east"); |
16799
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
1258 %! legend hide |
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
1259 %! legend show |
11363
a0dfd7e8e3e2
Assign data used in demo plots for reproducibility between runs
Rik <octave@nomad.inbox5.com>
parents:
11246
diff
changeset
|
1260 |
a0dfd7e8e3e2
Assign data used in demo plots for reproducibility between runs
Rik <octave@nomad.inbox5.com>
parents:
11246
diff
changeset
|
1261 %!demo |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1262 %! clf; |
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1263 %! plot (1:10, 1:10, 1:10, fliplr (1:10)); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1264 %! title ("Legend with keys in horizontal orientation"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1265 %! legend ({"I am blue", "I am green"}, ... |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1266 %! "location", "east", "orientation", "horizontal"); |
16805
2281d957cde6
legend.m: Tweak code for Octave coding conventions.
Rik <rik@octave.org>
parents:
16800
diff
changeset
|
1267 %! legend boxoff |
16799
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
1268 %! legend boxon |
11462
aed2c50c3082
legend.m: legend with more than two inline keys (bug 31991). Add/modifyy demos.
Ben Abbott <bpabbott@mac.com>
parents:
11434
diff
changeset
|
1269 |
aed2c50c3082
legend.m: legend with more than two inline keys (bug 31991). Add/modifyy demos.
Ben Abbott <bpabbott@mac.com>
parents:
11434
diff
changeset
|
1270 %!demo |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1271 %! clf; |
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1272 %! plot (1:10, 1:10, 1:10, fliplr (1:10)); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1273 %! title ("Legend with box off"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1274 %! legend ({"I am blue", "I am green"}, "location", "east"); |
16805
2281d957cde6
legend.m: Tweak code for Octave coding conventions.
Rik <rik@octave.org>
parents:
16800
diff
changeset
|
1275 %! legend boxoff |
11434
1f54ee6760b5
legend.m: Only one legend per axes (bug 32022)
Ben Abbott <bpabbott@mac.com>
parents:
11418
diff
changeset
|
1276 |
1f54ee6760b5
legend.m: Only one legend per axes (bug 32022)
Ben Abbott <bpabbott@mac.com>
parents:
11418
diff
changeset
|
1277 %!demo |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1278 %! clf; |
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1279 %! plot (1:10, 1:10, 1:10, fliplr (1:10)); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1280 %! title ("Legend with text to the left of key"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1281 %! legend ({"I am blue", "I am green"}, "location", "east"); |
17532
492d609d2d75
legend.m: Default text labels to "right" alignment for Matlab compatibility.
Rik <rik@octave.org>
parents:
17530
diff
changeset
|
1282 %! legend left |
8343
9f34f7636fe0
legend.m: Correct ording of legend labels.
Ben Abbott <bpabbott@mac.com>
parents:
8291
diff
changeset
|
1283 |
9f34f7636fe0
legend.m: Correct ording of legend labels.
Ben Abbott <bpabbott@mac.com>
parents:
8291
diff
changeset
|
1284 %!demo |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1285 %! clf; |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
1286 %! plot (1:10, 1:10, 1:10, fliplr (1:10)); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1287 %! title ({"Use properties to place legend text to the left of key", ... |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1288 %! "Legend text color is magenta"}); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1289 %! h = legend ({"I am blue", "I am green"}, "location", "east"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1290 %! legend ("right"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1291 %! set (h, "textposition", "left"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1292 %! set (h, "textcolor", [1 0 1]); |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
1293 |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
1294 %!demo |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
1295 %! clf; |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
1296 %! plot (1:10, 1:10, 1:10, fliplr (1:10)); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1297 %! title ("Legend is hidden"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1298 %! legend ({"I am blue", "I am green"}, "location", "east"); |
16805
2281d957cde6
legend.m: Tweak code for Octave coding conventions.
Rik <rik@octave.org>
parents:
16800
diff
changeset
|
1299 %! legend hide |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
1300 |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
1301 %!demo |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
1302 %! clf; |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
1303 %! x = 0:1; |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1304 %! plot (x,x,";I am Blue;", x,2*x,";I am Green;", x,3*x,";I am Red;"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1305 %! title ({"Labels are embedded in call to plot", ... |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1306 %! "Legend is hidden and then shown"}); |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
1307 %! legend boxon |
11434
1f54ee6760b5
legend.m: Only one legend per axes (bug 32022)
Ben Abbott <bpabbott@mac.com>
parents:
11418
diff
changeset
|
1308 %! legend hide |
1f54ee6760b5
legend.m: Only one legend per axes (bug 32022)
Ben Abbott <bpabbott@mac.com>
parents:
11418
diff
changeset
|
1309 %! legend show |
11363
a0dfd7e8e3e2
Assign data used in demo plots for reproducibility between runs
Rik <octave@nomad.inbox5.com>
parents:
11246
diff
changeset
|
1310 |
a0dfd7e8e3e2
Assign data used in demo plots for reproducibility between runs
Rik <octave@nomad.inbox5.com>
parents:
11246
diff
changeset
|
1311 %!demo |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
1312 %! clf; |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
1313 %! x = 0:1; |
22151
283d8dfcad37
Make demos Matlab compatible for comparison with dump_demos script.
Rik <rik@octave.org>
parents:
22069
diff
changeset
|
1314 %! plot (x,x, x,2*x, x,3*x); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1315 %! title ("Labels with interpreted Greek text"); |
22151
283d8dfcad37
Make demos Matlab compatible for comparison with dump_demos script.
Rik <rik@octave.org>
parents:
22069
diff
changeset
|
1316 %! h = legend ('\alpha', '\beta=2\alpha', '\gamma=3\alpha'); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1317 %! set (h, "interpreter", "tex"); |
11434
1f54ee6760b5
legend.m: Only one legend per axes (bug 32022)
Ben Abbott <bpabbott@mac.com>
parents:
11418
diff
changeset
|
1318 |
1f54ee6760b5
legend.m: Only one legend per axes (bug 32022)
Ben Abbott <bpabbott@mac.com>
parents:
11418
diff
changeset
|
1319 %!demo |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
1320 %! clf; |
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
1321 %! plot (rand (2)); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1322 %! title ("Labels with TeX interpreter turned off"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1323 %! h = legend ("Hello_World", "foo^bar"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1324 %! set (h, "interpreter", "none"); |
9451 | 1325 |
1326 %!demo | |
15442
015cc3d1f389
legend.m: Overhaul function and add support for automatic data labels.
Rik <rik@octave.org>
parents:
15441
diff
changeset
|
1327 %! clf; |
6146 | 1328 %! labels = {}; |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1329 %! colororder = get (gca, "colororder"); |
6146 | 1330 %! for i = 1:5 |
14363
f3d52523cde1
Use Octave coding conventions in all m-file %!test blocks
Rik <octave@nomad.inbox5.com>
parents:
14252
diff
changeset
|
1331 %! h = plot (1:100, i + rand (100,1)); hold on; |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1332 %! set (h, "color", colororder(i,:)); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1333 %! labels = {labels{:}, ["Signal ", num2str(i)]}; |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1334 %! endfor |
11363
a0dfd7e8e3e2
Assign data used in demo plots for reproducibility between runs
Rik <octave@nomad.inbox5.com>
parents:
11246
diff
changeset
|
1335 %! hold off; |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1336 %! title ({"Signals with random offset and uniform noise"; |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1337 %! "Legend shown below and outside of plot"}); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1338 %! xlabel ("Sample Nr [k]"); ylabel ("Amplitude [V]"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1339 %! legend (labels, "location", "southoutside"); |
9451 | 1340 |
1341 %!demo | |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1342 %! clf; |
9451 | 1343 %! x = linspace (0, 10); |
1344 %! plot (x, x); | |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1345 %! hold on; |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1346 %! stem (x, x.^2, "g"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1347 %! title ("First created object gets first label"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1348 %! legend ("linear"); |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1349 %! hold off; |
9451 | 1350 |
1351 %!demo | |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1352 %! clf; |
9451 | 1353 %! x = linspace (0, 10); |
1354 %! plot (x, x, x, x.^2); | |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1355 %! title ("First created object gets first label"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1356 %! legend ("linear"); |
9451 | 1357 |
1358 %!demo | |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1359 %! clf; |
9451 | 1360 %! x = linspace (0, 10); |
1361 %! plot (x, x, x, x.^2); | |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1362 %! title ("Labels are applied in order of object creation"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1363 %! legend ("linear", "quadratic"); |
9457
f9fb8c1a8e45
legend.m: Add an hggroup demo using bar(). Include clf() in each demo.
Ben Abbott <bpabbott@mac.com>
parents:
9451
diff
changeset
|
1364 |
f9fb8c1a8e45
legend.m: Add an hggroup demo using bar(). Include clf() in each demo.
Ben Abbott <bpabbott@mac.com>
parents:
9451
diff
changeset
|
1365 %!demo |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1366 %! clf; |
22629
4bd7bab38f39
Add stem example to the hggroup type of legend (bug #49341).
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
22489
diff
changeset
|
1367 %! subplot (2,1,1); |
11363
a0dfd7e8e3e2
Assign data used in demo plots for reproducibility between runs
Rik <octave@nomad.inbox5.com>
parents:
11246
diff
changeset
|
1368 %! rand_2x3_data1 = [0.341447, 0.171220, 0.284370; 0.039773, 0.731725, 0.779382]; |
a0dfd7e8e3e2
Assign data used in demo plots for reproducibility between runs
Rik <octave@nomad.inbox5.com>
parents:
11246
diff
changeset
|
1369 %! bar (rand_2x3_data1); |
13936
bfaacd5e7379
Bug fix (#34901). Allow legend options to be specified. Modify demo.
Ben Abbott <bpabbott@mac.com>
parents:
13279
diff
changeset
|
1370 %! ylim ([0 1.0]); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1371 %! title ("legend() works for bar graphs (hggroups)"); |
22629
4bd7bab38f39
Add stem example to the hggroup type of legend (bug #49341).
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
22489
diff
changeset
|
1372 %! legend ({"1st Bar", "2nd Bar", "3rd Bar"}, "location", "northwest"); |
4bd7bab38f39
Add stem example to the hggroup type of legend (bug #49341).
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
22489
diff
changeset
|
1373 %! subplot (2,1,2); |
22630
5ab3c91fc4bb
Correct hggroup plot legends for gnuplot toolkit, add legend demo 17 items (bug #49341)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
22629
diff
changeset
|
1374 %! x = linspace (0, 10, 20); |
5ab3c91fc4bb
Correct hggroup plot legends for gnuplot toolkit, add legend demo 17 items (bug #49341)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
22629
diff
changeset
|
1375 %! stem (x, 0.5+x.*rand (size (x))/max (x), "markeredgecolor", [0 0.7 0]); |
5ab3c91fc4bb
Correct hggroup plot legends for gnuplot toolkit, add legend demo 17 items (bug #49341)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
22629
diff
changeset
|
1376 %! hold on; |
5ab3c91fc4bb
Correct hggroup plot legends for gnuplot toolkit, add legend demo 17 items (bug #49341)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
22629
diff
changeset
|
1377 %! stem (x+10/(2*20), x.*(1.0+rand (size (x)))/max (x)); |
5ab3c91fc4bb
Correct hggroup plot legends for gnuplot toolkit, add legend demo 17 items (bug #49341)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
22629
diff
changeset
|
1378 %! xlim ([0 10+10/(2*20)]); |
22629
4bd7bab38f39
Add stem example to the hggroup type of legend (bug #49341).
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
22489
diff
changeset
|
1379 %! title ("legend() works for stem plots (hggroups)"); |
22630
5ab3c91fc4bb
Correct hggroup plot legends for gnuplot toolkit, add legend demo 17 items (bug #49341)
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
22629
diff
changeset
|
1380 %! legend ({"Multicolor", "Unicolor"}, "location", "northwest"); |
9457
f9fb8c1a8e45
legend.m: Add an hggroup demo using bar(). Include clf() in each demo.
Ben Abbott <bpabbott@mac.com>
parents:
9451
diff
changeset
|
1381 |
f9fb8c1a8e45
legend.m: Add an hggroup demo using bar(). Include clf() in each demo.
Ben Abbott <bpabbott@mac.com>
parents:
9451
diff
changeset
|
1382 %!demo |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1383 %! clf; |
20408
71bd638e0ef6
legend.m: Fix listeners on legend line objects (bug #45563).
Rik <rik@octave.org>
parents:
20286
diff
changeset
|
1384 %! colormap (cool (64)); |
71bd638e0ef6
legend.m: Fix listeners on legend line objects (bug #45563).
Rik <rik@octave.org>
parents:
20286
diff
changeset
|
1385 %! surf (peaks ()); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1386 %! legend ("peaks()"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1387 %! title ("legend() works for surface objects too"); |
20408
71bd638e0ef6
legend.m: Fix listeners on legend line objects (bug #45563).
Rik <rik@octave.org>
parents:
20286
diff
changeset
|
1388 |
71bd638e0ef6
legend.m: Fix listeners on legend line objects (bug #45563).
Rik <rik@octave.org>
parents:
20286
diff
changeset
|
1389 %!demo |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1390 %! clf reset; # needed to undo colormap assignment in previous demo |
11363
a0dfd7e8e3e2
Assign data used in demo plots for reproducibility between runs
Rik <octave@nomad.inbox5.com>
parents:
11246
diff
changeset
|
1391 %! rand_2x3_data2 = [0.44804, 0.84368, 0.23012; 0.72311, 0.58335, 0.90531]; |
a0dfd7e8e3e2
Assign data used in demo plots for reproducibility between runs
Rik <octave@nomad.inbox5.com>
parents:
11246
diff
changeset
|
1392 %! bar (rand_2x3_data2); |
a0dfd7e8e3e2
Assign data used in demo plots for reproducibility between runs
Rik <octave@nomad.inbox5.com>
parents:
11246
diff
changeset
|
1393 %! ylim ([0 1.2]); |
22151
283d8dfcad37
Make demos Matlab compatible for comparison with dump_demos script.
Rik <rik@octave.org>
parents:
22069
diff
changeset
|
1394 %! title ('"left" option places colors to the left of text label'); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1395 %! legend ("1st Bar", "2nd Bar", "3rd Bar"); |
18888
962db83e36c3
legend.m: Update demo 19 with more descriptive title.
Rik <rik@octave.org>
parents:
18753
diff
changeset
|
1396 %! legend left; |
10662
3afcd24ced61
legend.m: Key labels for specified objects.
Ben Abbott <bpabbott@mac.com>
parents:
10549
diff
changeset
|
1397 |
3afcd24ced61
legend.m: Key labels for specified objects.
Ben Abbott <bpabbott@mac.com>
parents:
10549
diff
changeset
|
1398 %!demo |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1399 %! clf; |
10662
3afcd24ced61
legend.m: Key labels for specified objects.
Ben Abbott <bpabbott@mac.com>
parents:
10549
diff
changeset
|
1400 %! x = 0:0.1:7; |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1401 %! h = plot (x,sin(x), x,cos(x), x,sin(x.^2/10), x,cos(x.^2/10)); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1402 %! title ("Only the sin() objects have keylabels"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1403 %! legend (h([1, 3]), {"sin (x)", "sin (x^2/10)"}, "location", "southwest"); |
11363
a0dfd7e8e3e2
Assign data used in demo plots for reproducibility between runs
Rik <octave@nomad.inbox5.com>
parents:
11246
diff
changeset
|
1404 |
12340
d63007ac067a
legend.m: Add demo for inline keys created by two plot commands.
Ben Abbott <bpabbott@mac.com>
parents:
12339
diff
changeset
|
1405 %!demo |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1406 %! clf; |
12340
d63007ac067a
legend.m: Add demo for inline keys created by two plot commands.
Ben Abbott <bpabbott@mac.com>
parents:
12339
diff
changeset
|
1407 %! x = 0:0.1:10; |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1408 %! plot (x, sin (x), ";sin (x);"); |
22069
9121d6584f6a
Overhaul graphics implementation of hold() (bug #43559).
Rik <rik@octave.org>
parents:
22054
diff
changeset
|
1409 %! hold on; |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1410 %! plot (x, cos (x), ";cos (x);"); |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1411 %! hold off; |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1412 %! title ("legend constructed from multiple plot calls"); |
12340
d63007ac067a
legend.m: Add demo for inline keys created by two plot commands.
Ben Abbott <bpabbott@mac.com>
parents:
12339
diff
changeset
|
1413 |
12387
5fb6ea1bff65
legend.m: Add demo for replacing existing legend.
Ben Abbott <bpabbott@mac.com>
parents:
12340
diff
changeset
|
1414 %!demo |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1415 %! clf; |
12387
5fb6ea1bff65
legend.m: Add demo for replacing existing legend.
Ben Abbott <bpabbott@mac.com>
parents:
12340
diff
changeset
|
1416 %! x = 0:0.1:10; |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1417 %! plot (x, sin (x), ";sin (x);"); |
22069
9121d6584f6a
Overhaul graphics implementation of hold() (bug #43559).
Rik <rik@octave.org>
parents:
22054
diff
changeset
|
1418 %! hold on; |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1419 %! plot (x, cos (x), ";cos (x);"); |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1420 %! hold off; |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1421 %! title ("Specified label text overrides previous labels"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1422 %! legend ({"Sine", "Cosine"}, "location", "northeastoutside"); |
12387
5fb6ea1bff65
legend.m: Add demo for replacing existing legend.
Ben Abbott <bpabbott@mac.com>
parents:
12340
diff
changeset
|
1423 |
12394
c2e1973d870b
legend.m: "legend off" should delete the legend object.
Ben Abbott <bpabbott@mac.com>
parents:
12388
diff
changeset
|
1424 %!demo |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1425 %! clf; |
12394
c2e1973d870b
legend.m: "legend off" should delete the legend object.
Ben Abbott <bpabbott@mac.com>
parents:
12388
diff
changeset
|
1426 %! x = 0:10; |
c2e1973d870b
legend.m: "legend off" should delete the legend object.
Ben Abbott <bpabbott@mac.com>
parents:
12388
diff
changeset
|
1427 %! plot (x, rand (11)); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1428 %! xlabel ("Indices"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1429 %! ylabel ("Random Values"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1430 %! title ('Legend "off" deletes the legend'); |
22624
37b7b86f62f2
Fix legend.m typo in demo example 23 (bug #49341).
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
22489
diff
changeset
|
1431 %! legend (cellstr (num2str ((0:10)')), "location", "northeastoutside"); |
37b7b86f62f2
Fix legend.m typo in demo example 23 (bug #49341).
Daniel J Sebald <daniel.sebald@ieee.org>
parents:
22489
diff
changeset
|
1432 %! pause (1); |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1433 %! legend off; |
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1434 %! axis ([0, 10, 0 1]); |
12387
5fb6ea1bff65
legend.m: Add demo for replacing existing legend.
Ben Abbott <bpabbott@mac.com>
parents:
12340
diff
changeset
|
1435 |
12395
4d30b4136a3e
legend.m: Align legends to plot box, add demo. Bug 32373.
Ben Abbott <bpabbott@mac.com>
parents:
12394
diff
changeset
|
1436 %!demo |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1437 %! clf; |
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1438 %! x = (1:5)'; |
14363
f3d52523cde1
Use Octave coding conventions in all m-file %!test blocks
Rik <octave@nomad.inbox5.com>
parents:
14252
diff
changeset
|
1439 %! subplot (2,2,1); |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1440 %! plot (x, rand (numel (x))); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1441 %! legend (cellstr (num2str (x)), "location", "northwestoutside"); |
14363
f3d52523cde1
Use Octave coding conventions in all m-file %!test blocks
Rik <octave@nomad.inbox5.com>
parents:
14252
diff
changeset
|
1442 %! subplot (2,2,2); |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1443 %! plot (x, rand (numel (x))); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1444 %! legend (cellstr (num2str (x)), "location", "northeastoutside"); |
14363
f3d52523cde1
Use Octave coding conventions in all m-file %!test blocks
Rik <octave@nomad.inbox5.com>
parents:
14252
diff
changeset
|
1445 %! subplot (2,2,3); |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1446 %! plot (x, rand (numel (x))); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1447 %! legend (cellstr (num2str (x)), "location", "southwestoutside"); |
14363
f3d52523cde1
Use Octave coding conventions in all m-file %!test blocks
Rik <octave@nomad.inbox5.com>
parents:
14252
diff
changeset
|
1448 %! subplot (2,2,4); |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1449 %! plot (x, rand (numel (x))); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1450 %! legend (cellstr (num2str (x)), "location", "southeastoutside"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1451 %! ## Legend works on a per axes basis for each subplot |
12387
5fb6ea1bff65
legend.m: Add demo for replacing existing legend.
Ben Abbott <bpabbott@mac.com>
parents:
12340
diff
changeset
|
1452 |
12395
4d30b4136a3e
legend.m: Align legends to plot box, add demo. Bug 32373.
Ben Abbott <bpabbott@mac.com>
parents:
12394
diff
changeset
|
1453 %!demo |
14237
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1454 %! clf; |
11949c9795a0
Revamp %!demos in m-files to use Octave coding conventions on spacing, etc.
Rik <octave@nomad.inbox5.com>
parents:
14236
diff
changeset
|
1455 %! plot (rand (2)); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1456 %! title ("legend() will warn if extra labels are specified"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1457 %! legend ("Hello", "World", "interpreter", "foobar"); |
13979
f35b593688a5
Changing the legend's interpreter property should be inherited by the
Ben Abbott <bpabbott@mac.com>
parents:
13937
diff
changeset
|
1458 |
f35b593688a5
Changing the legend's interpreter property should be inherited by the
Ben Abbott <bpabbott@mac.com>
parents:
13937
diff
changeset
|
1459 %!demo |
16799
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
1460 %! clf; |
14207
57e3490094e1
Fix order of legend entries for plotyy. Bug # 35314.
Ben Abbott <bpabbott@mac.com>
parents:
14138
diff
changeset
|
1461 %! x = 0:10; |
57e3490094e1
Fix order of legend entries for plotyy. Bug # 35314.
Ben Abbott <bpabbott@mac.com>
parents:
14138
diff
changeset
|
1462 %! y1 = rand (size (x)); |
57e3490094e1
Fix order of legend entries for plotyy. Bug # 35314.
Ben Abbott <bpabbott@mac.com>
parents:
14138
diff
changeset
|
1463 %! y2 = rand (size (x)); |
57e3490094e1
Fix order of legend entries for plotyy. Bug # 35314.
Ben Abbott <bpabbott@mac.com>
parents:
14138
diff
changeset
|
1464 %! [ax, h1, h2] = plotyy (x, y1, x, y2); |
22366
837df5db5710
Make graphic functions visually compatible w/Matlab.
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
1465 %! title ("plotyy legend test #1: Blue and Green labels"); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1466 %! legend ([h1, h2], {"Blue", "Green"}, "location", "south"); |
12395
4d30b4136a3e
legend.m: Align legends to plot box, add demo. Bug 32373.
Ben Abbott <bpabbott@mac.com>
parents:
12394
diff
changeset
|
1467 |
13979
f35b593688a5
Changing the legend's interpreter property should be inherited by the
Ben Abbott <bpabbott@mac.com>
parents:
13937
diff
changeset
|
1468 %!demo |
16799
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
1469 %! clf; |
14207
57e3490094e1
Fix order of legend entries for plotyy. Bug # 35314.
Ben Abbott <bpabbott@mac.com>
parents:
14138
diff
changeset
|
1470 %! x = 0:10; |
57e3490094e1
Fix order of legend entries for plotyy. Bug # 35314.
Ben Abbott <bpabbott@mac.com>
parents:
14138
diff
changeset
|
1471 %! y1 = rand (size (x)); |
57e3490094e1
Fix order of legend entries for plotyy. Bug # 35314.
Ben Abbott <bpabbott@mac.com>
parents:
14138
diff
changeset
|
1472 %! y2 = rand (size (x)); |
57e3490094e1
Fix order of legend entries for plotyy. Bug # 35314.
Ben Abbott <bpabbott@mac.com>
parents:
14138
diff
changeset
|
1473 %! [ax, h1, h2] = plotyy (x, y1, x, y2); |
22366
837df5db5710
Make graphic functions visually compatible w/Matlab.
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
1474 %! title ("plotyy legend test #2: Blue and Green labels"); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1475 %! legend ({"Blue", "Green"}, "location", "south"); |
13979
f35b593688a5
Changing the legend's interpreter property should be inherited by the
Ben Abbott <bpabbott@mac.com>
parents:
13937
diff
changeset
|
1476 |
f35b593688a5
Changing the legend's interpreter property should be inherited by the
Ben Abbott <bpabbott@mac.com>
parents:
13937
diff
changeset
|
1477 %!demo |
16799
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
1478 %! clf; |
14207
57e3490094e1
Fix order of legend entries for plotyy. Bug # 35314.
Ben Abbott <bpabbott@mac.com>
parents:
14138
diff
changeset
|
1479 %! x = 0:10; |
57e3490094e1
Fix order of legend entries for plotyy. Bug # 35314.
Ben Abbott <bpabbott@mac.com>
parents:
14138
diff
changeset
|
1480 %! y1 = rand (size (x)); |
57e3490094e1
Fix order of legend entries for plotyy. Bug # 35314.
Ben Abbott <bpabbott@mac.com>
parents:
14138
diff
changeset
|
1481 %! y2 = rand (size (x)); |
57e3490094e1
Fix order of legend entries for plotyy. Bug # 35314.
Ben Abbott <bpabbott@mac.com>
parents:
14138
diff
changeset
|
1482 %! [ax, h1, h2] = plotyy (x, y1, x, y2); |
22366
837df5db5710
Make graphic functions visually compatible w/Matlab.
Rik <rik@octave.org>
parents:
22323
diff
changeset
|
1483 %! title ("plotyy legend test #3: Blue and Green labels"); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1484 %! legend ("Blue", "Green", "location", "south"); |
13979
f35b593688a5
Changing the legend's interpreter property should be inherited by the
Ben Abbott <bpabbott@mac.com>
parents:
13937
diff
changeset
|
1485 |
20408
71bd638e0ef6
legend.m: Fix listeners on legend line objects (bug #45563).
Rik <rik@octave.org>
parents:
20286
diff
changeset
|
1486 %!demo |
71bd638e0ef6
legend.m: Fix listeners on legend line objects (bug #45563).
Rik <rik@octave.org>
parents:
20286
diff
changeset
|
1487 %! clf; |
71bd638e0ef6
legend.m: Fix listeners on legend line objects (bug #45563).
Rik <rik@octave.org>
parents:
20286
diff
changeset
|
1488 %! plot (1:10, 1:10); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1489 %! title ("a very long label can sometimes cause problems"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1490 %! legend ("hello very big world", "location", "northeastoutside"); |
20408
71bd638e0ef6
legend.m: Fix listeners on legend line objects (bug #45563).
Rik <rik@octave.org>
parents:
20286
diff
changeset
|
1491 |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1492 %!demo # bug 36408 |
16799
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
1493 %! clf; |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1494 %! option = "right"; |
16805
2281d957cde6
legend.m: Tweak code for Octave coding conventions.
Rik <rik@octave.org>
parents:
16800
diff
changeset
|
1495 %! subplot (3,1,1); |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1496 %! plot (rand (1,4)); |
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1497 %! xlabel xlabel; |
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1498 %! ylabel ylabel; |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1499 %! title ("Subplots adjust to the legend placed outside"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1500 %! legend ({"1"}, "location", "northeastoutside"); |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1501 %! legend (option); |
16805
2281d957cde6
legend.m: Tweak code for Octave coding conventions.
Rik <rik@octave.org>
parents:
16800
diff
changeset
|
1502 %! subplot (3,1,2); |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1503 %! plot (rand (1,4)); |
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1504 %! xlabel xlabel; |
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1505 %! ylabel ylabel; |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1506 %! legend ({"1234567890"}, "location", "eastoutside"); |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1507 %! legend (option); |
16805
2281d957cde6
legend.m: Tweak code for Octave coding conventions.
Rik <rik@octave.org>
parents:
16800
diff
changeset
|
1508 %! subplot (3,1,3); |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1509 %! plot (rand (1,4)); |
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1510 %! xlabel xlabel; |
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1511 %! ylabel ylabel; |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1512 %! legend ({"12345678901234567890"}, "location", "southeastoutside"); |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1513 %! legend (option); |
16799
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
1514 |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1515 %!demo # bug 36408 |
16799
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
1516 %! clf; |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1517 %! option = "right"; |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1518 %! subplot (3,1,1); |
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1519 %! plot (rand (1,4)); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1520 %! title ("Subplots adjust to the legend placed outside"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1521 %! legend ({"1"}, "location", "northwestoutside"); |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1522 %! legend (option); |
16805
2281d957cde6
legend.m: Tweak code for Octave coding conventions.
Rik <rik@octave.org>
parents:
16800
diff
changeset
|
1523 %! subplot (3,1,2); |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1524 %! plot (rand (1,4)); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1525 %! legend ({"1234567890"}, "location", "westoutside"); |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1526 %! legend (option); |
16805
2281d957cde6
legend.m: Tweak code for Octave coding conventions.
Rik <rik@octave.org>
parents:
16800
diff
changeset
|
1527 %! subplot (3,1,3); |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1528 %! plot (rand (1,4)); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1529 %! legend ({"12345678901234567890"}, "location", "southwestoutside"); |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1530 %! legend (option); |
16799
286904321282
Use unmodified axes "position" and "outerposition" properties for legend().
Ben Abbott <bpabbott@mac.com>
parents:
16796
diff
changeset
|
1531 |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1532 %!demo # bug 36408 |
16908
1c4be5dcacd5
Add demos to legend.m using subplots.
Ben Abbott <bpabbott@mac.com>
parents:
16885
diff
changeset
|
1533 %! clf; |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1534 %! option = "right"; |
16908
1c4be5dcacd5
Add demos to legend.m using subplots.
Ben Abbott <bpabbott@mac.com>
parents:
16885
diff
changeset
|
1535 %! subplot (3,1,1); |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1536 %! plot (rand (1,4)); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1537 %! set (gca (), "yaxislocation", "right"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1538 %! xlabel ("xlabel"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1539 %! ylabel ("ylabel"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1540 %! title ("Subplots adjust to the legend placed outside"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1541 %! legend ({"1"}, "location", "northeastoutside"); |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1542 %! legend (option); |
16908
1c4be5dcacd5
Add demos to legend.m using subplots.
Ben Abbott <bpabbott@mac.com>
parents:
16885
diff
changeset
|
1543 %! subplot (3,1,2); |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1544 %! plot (rand (1,4)); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1545 %! set (gca (), "yaxislocation", "right"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1546 %! xlabel ("xlabel"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1547 %! ylabel ("ylabel"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1548 %! legend ({"1234567890"}, "location", "eastoutside"); |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1549 %! legend (option); |
16908
1c4be5dcacd5
Add demos to legend.m using subplots.
Ben Abbott <bpabbott@mac.com>
parents:
16885
diff
changeset
|
1550 %! subplot (3,1,3); |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1551 %! plot (rand (1,4)); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1552 %! set (gca (), "yaxislocation", "right"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1553 %! xlabel ("xlabel"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1554 %! ylabel ("ylabel"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1555 %! legend ({"12345678901234567890"}, "location", "southeastoutside"); |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1556 %! legend (option); |
16908
1c4be5dcacd5
Add demos to legend.m using subplots.
Ben Abbott <bpabbott@mac.com>
parents:
16885
diff
changeset
|
1557 |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1558 %!demo # bug 36408 |
16908
1c4be5dcacd5
Add demos to legend.m using subplots.
Ben Abbott <bpabbott@mac.com>
parents:
16885
diff
changeset
|
1559 %! clf; |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1560 %! option = "right"; |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1561 %! subplot (3,1,1); |
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1562 %! plot (rand (1,4)); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1563 %! set (gca (), "yaxislocation", "right"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1564 %! xlabel ("xlabel"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1565 %! ylabel ("ylabel"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1566 %! title ("Subplots adjust to the legend placed outside"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1567 %! legend ({"1"}, "location", "northwestoutside"); |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1568 %! legend (option); |
16908
1c4be5dcacd5
Add demos to legend.m using subplots.
Ben Abbott <bpabbott@mac.com>
parents:
16885
diff
changeset
|
1569 %! subplot (3,1,2); |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1570 %! plot (rand (1,4)); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1571 %! set (gca (), "yaxislocation", "right"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1572 %! xlabel ("xlabel"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1573 %! ylabel ("ylabel"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1574 %! legend ({"1234567890"}, "location", "westoutside"); |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1575 %! legend (option); |
16908
1c4be5dcacd5
Add demos to legend.m using subplots.
Ben Abbott <bpabbott@mac.com>
parents:
16885
diff
changeset
|
1576 %! subplot (3,1,3); |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1577 %! plot (rand (1,4)); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1578 %! set (gca (), "yaxislocation", "right"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1579 %! xlabel ("xlabel"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1580 %! ylabel ("ylabel"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1581 %! legend ({"12345678901234567890"}, "location", "southwestoutside"); |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1582 %! legend (option); |
16908
1c4be5dcacd5
Add demos to legend.m using subplots.
Ben Abbott <bpabbott@mac.com>
parents:
16885
diff
changeset
|
1583 |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1584 %!demo # bug 36408; |
16908
1c4be5dcacd5
Add demos to legend.m using subplots.
Ben Abbott <bpabbott@mac.com>
parents:
16885
diff
changeset
|
1585 %! clf; |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1586 %! option = "right"; |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1587 %! subplot (3,1,1); |
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1588 %! plot (rand (1,4)); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1589 %! set (gca (), "xaxislocation", "top"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1590 %! xlabel ("xlabel"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1591 %! ylabel ("ylabel"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1592 %! title ("Subplots adjust to the legend placed outside"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1593 %! legend ({"1"}, "location", "northwestoutside"); |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1594 %! legend (option); |
16908
1c4be5dcacd5
Add demos to legend.m using subplots.
Ben Abbott <bpabbott@mac.com>
parents:
16885
diff
changeset
|
1595 %! subplot (3,1,2); |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1596 %! plot (rand (1,4)); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1597 %! set (gca (), "xaxislocation", "top"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1598 %! xlabel ("xlabel"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1599 %! ylabel ("ylabel"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1600 %! legend ({"1234567890"}, "location", "westoutside"); |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1601 %! legend (option); |
16908
1c4be5dcacd5
Add demos to legend.m using subplots.
Ben Abbott <bpabbott@mac.com>
parents:
16885
diff
changeset
|
1602 %! subplot (3,1,3); |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1603 %! plot (rand (1,4)); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1604 %! set (gca (), "xaxislocation", "top"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1605 %! xlabel ("xlabel"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1606 %! ylabel ("ylabel"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1607 %! legend ({"12345678901234567890"}, "location", "southwestoutside"); |
16921
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1608 %! legend (option); |
9a316ec12b5f
legend.m: Use Matlab coding conventions in %!demo blocks so comparison script can run.
Rik <rik@octave.org>
parents:
16910
diff
changeset
|
1609 |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1610 %!demo # bug 39697 |
17190
df4c4b7708a4
Add titles and clean-up plotting %!demos.
Rik <rik@octave.org>
parents:
17179
diff
changeset
|
1611 %! clf; |
17179
828e8852efa9
legend.m: Add %!demo block showing bug #39697.
Rik <rik@octave.org>
parents:
17174
diff
changeset
|
1612 %! plot (1:10); |
22302
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1613 %! legend ("Legend Text"); |
1c4cd12987f5
Use Octave syntax in graphics demos.
Rik <rik@octave.org>
parents:
22151
diff
changeset
|
1614 %! title ({"Multi-line", "titles", "are a", "problem", "See bug #39697"}); |
17179
828e8852efa9
legend.m: Add %!demo block showing bug #39697.
Rik <rik@octave.org>
parents:
17174
diff
changeset
|
1615 |
16973
d429a05dc11c
legend.m: Move %!test block below %!demo blocks per standard usage.
Rik <rik@octave.org>
parents:
16933
diff
changeset
|
1616 %!test |
17107
dbd64c9a16da
Restore graphics toolkit after %!tests that alter it.
Rik <rik@octave.org>
parents:
17065
diff
changeset
|
1617 %! toolkit = graphics_toolkit ("gnuplot"); |
17119
bd50e0660545
test: Add missing semicolons to suppress output in some plot %!tests.
Rik <rik@octave.org>
parents:
17107
diff
changeset
|
1618 %! h = figure ("visible", "off"); |
16973
d429a05dc11c
legend.m: Move %!test block below %!demo blocks per standard usage.
Rik <rik@octave.org>
parents:
16933
diff
changeset
|
1619 %! unwind_protect |
d429a05dc11c
legend.m: Move %!test block below %!demo blocks per standard usage.
Rik <rik@octave.org>
parents:
16933
diff
changeset
|
1620 %! position = get (h, "position"); |
d429a05dc11c
legend.m: Move %!test block below %!demo blocks per standard usage.
Rik <rik@octave.org>
parents:
16933
diff
changeset
|
1621 %! plot (rand (3)); |
d429a05dc11c
legend.m: Move %!test block below %!demo blocks per standard usage.
Rik <rik@octave.org>
parents:
16933
diff
changeset
|
1622 %! legend (); |
19278
6ca096827123
Use tempname() rather than tmpnam() in core Octave.
Rik <rik@octave.org>
parents:
18937
diff
changeset
|
1623 %! filename = sprintf ("%s.eps", tempname ()); |
16973
d429a05dc11c
legend.m: Move %!test block below %!demo blocks per standard usage.
Rik <rik@octave.org>
parents:
16933
diff
changeset
|
1624 %! print (filename); |
d429a05dc11c
legend.m: Move %!test block below %!demo blocks per standard usage.
Rik <rik@octave.org>
parents:
16933
diff
changeset
|
1625 %! unlink (filename); |
d429a05dc11c
legend.m: Move %!test block below %!demo blocks per standard usage.
Rik <rik@octave.org>
parents:
16933
diff
changeset
|
1626 %! assert (get (h, "position"), position); |
d429a05dc11c
legend.m: Move %!test block below %!demo blocks per standard usage.
Rik <rik@octave.org>
parents:
16933
diff
changeset
|
1627 %! unwind_protect_cleanup |
d429a05dc11c
legend.m: Move %!test block below %!demo blocks per standard usage.
Rik <rik@octave.org>
parents:
16933
diff
changeset
|
1628 %! close (h); |
17107
dbd64c9a16da
Restore graphics toolkit after %!tests that alter it.
Rik <rik@octave.org>
parents:
17065
diff
changeset
|
1629 %! graphics_toolkit (toolkit); |
16973
d429a05dc11c
legend.m: Move %!test block below %!demo blocks per standard usage.
Rik <rik@octave.org>
parents:
16933
diff
changeset
|
1630 %! end_unwind_protect |
d429a05dc11c
legend.m: Move %!test block below %!demo blocks per standard usage.
Rik <rik@octave.org>
parents:
16933
diff
changeset
|
1631 |
22489
93ea313301f9
test: Add bug ids (<#####>) to BIST tests.
Rik <rik@octave.org>
parents:
22366
diff
changeset
|
1632 %!test <42035> |
18647
ce36233e4849
legend.m: Correctly handle axis handle as first argument (bug #42035).
Rik <rik@octave.org>
parents:
18644
diff
changeset
|
1633 %! h = figure ("visible", "off"); |
ce36233e4849
legend.m: Correctly handle axis handle as first argument (bug #42035).
Rik <rik@octave.org>
parents:
18644
diff
changeset
|
1634 %! unwind_protect |
ce36233e4849
legend.m: Correctly handle axis handle as first argument (bug #42035).
Rik <rik@octave.org>
parents:
18644
diff
changeset
|
1635 %! hax1 = subplot (1,2,1); |
ce36233e4849
legend.m: Correctly handle axis handle as first argument (bug #42035).
Rik <rik@octave.org>
parents:
18644
diff
changeset
|
1636 %! plot (1:10); |
ce36233e4849
legend.m: Correctly handle axis handle as first argument (bug #42035).
Rik <rik@octave.org>
parents:
18644
diff
changeset
|
1637 %! hax2 = subplot (1,2,2); |
ce36233e4849
legend.m: Correctly handle axis handle as first argument (bug #42035).
Rik <rik@octave.org>
parents:
18644
diff
changeset
|
1638 %! plot (1:10); |
ce36233e4849
legend.m: Correctly handle axis handle as first argument (bug #42035).
Rik <rik@octave.org>
parents:
18644
diff
changeset
|
1639 %! hleg1 = legend (hax1, "foo"); |
21580
ecce63c99c3f
maint: Add semicolons to terminate code in %! blocks.
Rik <rik@octave.org>
parents:
21385
diff
changeset
|
1640 %! assert (get (hleg1, "userdata").handle, hax1); |
18647
ce36233e4849
legend.m: Correctly handle axis handle as first argument (bug #42035).
Rik <rik@octave.org>
parents:
18644
diff
changeset
|
1641 %! assert (gca (), hax2); |
ce36233e4849
legend.m: Correctly handle axis handle as first argument (bug #42035).
Rik <rik@octave.org>
parents:
18644
diff
changeset
|
1642 %! hleg2 = legend ("bar"); |
21580
ecce63c99c3f
maint: Add semicolons to terminate code in %! blocks.
Rik <rik@octave.org>
parents:
21385
diff
changeset
|
1643 %! assert (get (hleg2, "userdata").handle, gca ()); |
18647
ce36233e4849
legend.m: Correctly handle axis handle as first argument (bug #42035).
Rik <rik@octave.org>
parents:
18644
diff
changeset
|
1644 %! unwind_protect_cleanup |
ce36233e4849
legend.m: Correctly handle axis handle as first argument (bug #42035).
Rik <rik@octave.org>
parents:
18644
diff
changeset
|
1645 %! close (h); |
ce36233e4849
legend.m: Correctly handle axis handle as first argument (bug #42035).
Rik <rik@octave.org>
parents:
18644
diff
changeset
|
1646 %! end_unwind_protect |
ce36233e4849
legend.m: Correctly handle axis handle as first argument (bug #42035).
Rik <rik@octave.org>
parents:
18644
diff
changeset
|
1647 |