Daniel, there is an additional option for Text objects that does what you 
want. Add the keyword argument "clip=True" to your text and it will be 
clipped according to the min/max settings.

This option is not yet in the documentation, so I've created a ticket to 
take care of that:

https://trac.sagemath.org/ticket/21074

Thanks for pointing this out!

On Wednesday, July 20, 2016 at 10:56:44 PM UTC-7, Daniel Mulholland wrote:
>
> Hi,
>  
> I'd like to report what I think is a bug in sage.
>  
>  
> When selecting xmin, xmax and ymin ymax in a plot, if there is a text 
> element, e.g.
>  
>  
> text(lable, midpoint(point,line_end), horizontal_alignment='left', 
> vertical_alignment='top', fontsize='xx-small', color='black')
>  
>  
> which is outside the plotting boundaries it is still displayed.
>  
> See for instance this standalone code fragment:
>  
> a = plot(x^2, (x,0,5))
> b = text("hi there wonderful Sage and SMC people", (30,30), 
> horizontal_alignment='left', vertical_alignment='top', fontsize='xx-small', 
> color='black')
> show(sum([a,b]),aspect_ratio=1, xmin=-10,xmax=40, ymin=-10, ymax=40, 
> axes_labels=['$R$ pri. $\Omega$','$X$ pri. $\Omega$'], axes_labels_size=1)
> show(sum([a,b]),aspect_ratio=1, xmin=-10,xmax=40, ymin=-10, ymax=20, 
> axes_labels=['$R$ pri. $\Omega$','$X$ pri. $\Omega$'], axes_labels_size=1)
>  
> The expected behaviour was that text above ymax=20 would not be displayed 
> or would be cut off to fit the axes.
>
> NB: This is a re-send of something sent around 4 June which was during a 
> system failure.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to