Hi,

I am trying to draw a rectangle of a fixed size and them put a lable/text on
it. However if the text is too long, it goes out of bounds. Is there a way I
restrict the text within the rectangle margins.

heres what I am using
######################################
 def  rectangle(self, lower, upper, node1, branch_name):
        rect = Rectangle(lower, upper[0]-lower[0], upper[1] - lower[1],
                   edgecolor='k',
                   facecolor= self.color_method(node1))

       self.ax.add_patch(rect)
       self.ax.text(lower[0] + (upper[0]-lower[0])/2, lower[1] +
(upper[1]-lower[1])/2, branch_name, ha='left', va='center',
fontsize='xx-small')
########################################
Any thoughts / suggestion will be really appreciated.

Thanks

samir
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to