octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #52185] Make it possible to position annotatio


From: Etienne Dechamps
Subject: [Octave-bug-tracker] [bug #52185] Make it possible to position annotations relative to axes or data
Date: Sun, 8 Oct 2017 06:37:34 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0

Follow-up Comment #1, bug #52185 (project octave):

I discovered the following workaround which (almost) does what I want:


a = annotation('arrow', [0 1], [0 1]);
set(a, 'parent', gca());


Indeed, by default, annotations get created in a separate "implicit" axes
object that spans the entire figure. Changing the annotation to use a
different axes as its parent changes its coordinate system to the data
coordinate system of the specified axes, and voilĂ .

The downside is, when using arrows (for example), *everything* becomes
relative to the data coordinate system, including the drawing of the
arrowhead. This means, for example, that if the axes are non-square (or worse,
use a log scale), the arrowhead will be deformed. This is probably not a
problem for line annotations, however.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?52185>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]