[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bounds on position for text()
From: |
Konstantinos Poulios |
Subject: |
Re: bounds on position for text() |
Date: |
Mon, 7 Feb 2011 00:21:23 +0100 |
On Mon, Feb 7, 2011 at 12:16 AM, Michael D Godfrey
<address@hidden> wrote:
> On 02/06/2011 02:49 PM, logari81 wrote:
>
> On Sun, 2011-02-06 at 17:21 -0500, Ben Abbott wrote:
>
>> On Feb 6, 2011, at 4:02 PM, Michael D Godfrey wrote:
>>
>
>> > A short while ago I created a bug report
>> > (32311) which pointed out the fact that
>> > text(x,y,"xxx') only works for x,y within the
>> > axes. Matlab and legend allow writing the
>> > string anywhere in the window.
>> >
>> > Since you just fixed legend, any chance
>> > you could look at this? Quite a lot of Matlab
>> > code write annotations on plots using text
>> > and positions this outside the axes.
>> >
>> > Michael
>
>>
>> I notice this work for the gnuplot backend, but not for the FLTK backend.
>>
>> It looks to me like something is checking the x/ydata values and not
>> rendering the result if it is outsize the axis limits.
>>
>> I'd expect this to be done in gl_render.cc, but don't see where it is.
>> I've cc'd Kostas, in case he knows where this is done.
>>
>> Ben
>>
>
> printing of text objects is done in draw_axes_children in gl-render.cc
> after the clipping property is checked.
>
> So it works if you just set clipping off, like:
>
> set(ht,'clipping','off')
>
> If it would make sense we could change the default clipping to on.
>
> Kostas
>
> I just tried this. It does not work.
> octave:1> ht=plot(1:200)
> ht = -19.142
> octave:2> set(ht,'clipping','off');
> octave:3> text(200,-2,'this is it')
> octave:4> set(ht,'clipping','on');
> octave:5> text(200,-2,'this is it')
> octave:6> text(200,2,'this is it')
> octave:7> text(200,20,'this is it')
> octave:8> text(201,20,'this is it')
> octave:9>
> =========================
> None of the text commands with x,y outside axes prints.
>
>
the clipping property refers to the text object, so just try:
ht=text(200,-2,'this is it');
set(ht,'clipping','on');
Kostas
- bounds on position for text(), Michael D Godfrey, 2011/02/06
- Re: bounds on position for text(), Ben Abbott, 2011/02/06
- Re: bounds on position for text(), logari81, 2011/02/06
- Re: bounds on position for text(), Michael D Godfrey, 2011/02/06
- Re: bounds on position for text(),
Konstantinos Poulios <=
- Re: bounds on position for text(), Michael D Godfrey, 2011/02/06
- Re: bounds on position for text(), Ben Abbott, 2011/02/06
- Re: bounds on position for text(), Konstantinos Poulios, 2011/02/09
- Re: bounds on position for text(), bpabbott, 2011/02/09
- Re: bounds on position for text(), Michael D Godfrey, 2011/02/09
- Re: bounds on position for text(), logari81, 2011/02/09
- Re: bounds on position for text(), Michael D Godfrey, 2011/02/09
- Re: bounds on position for text(), bpabbott, 2011/02/09
- Re: bounds on position for text(), Michael D Godfrey, 2011/02/09
- Re: bounds on position for text(), bpabbott, 2011/02/09