本文整理汇总了Python中matplotlib.patches.Rectangle.figobj_hl方法的典型用法代码示例。如果您正苦于以下问题:Python Rectangle.figobj_hl方法的具体用法?Python Rectangle.figobj_hl怎么用?Python Rectangle.figobj_hl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib.patches.Rectangle
的用法示例。
在下文中一共展示了Rectangle.figobj_hl方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: generate_artist
# 需要导入模块: from matplotlib.patches import Rectangle [as 别名]
# 或者: from matplotlib.patches.Rectangle import figobj_hl [as 别名]
def generate_artist(self, *args, **kywds):
# print 'entering fig_grp:: generate_artist'
for name, child in self.get_children():
if child._suppress:
child.del_artist(delall=True)
else:
child.generate_artist(*args, **kywds)
ax = self.get_figaxes()
c = self.get_container()
if self.isempty():
a = Rectangle((0,0), 1, 1, facecolor='none', fill=False,
edgecolor='none', alpha=0)
a.figobj=self
a.figobj_hl=[]
self._artists = [a]
c.patches.append(a)
if ax is not None and ax.get_3d():
import mpl_toolkits.mplot3d.art3d as art3d
art3d.patch_2d_to_3d(a)
figure = self.get_figpage()._artists[0]
a.set_figure(figure)
if self.get_figaxes() is not None:
if len(self.get_figaxes()._artists) != 0:
a.axes = self.get_figaxes()._artists[0]
示例2: make_newartist
# 需要导入模块: from matplotlib.patches import Rectangle [as 别名]
# 或者: from matplotlib.patches.Rectangle import figobj_hl [as 别名]
def make_newartist(self):
self.check_loaded_gp_data()
x1, y1=self.get_gp(0).get_device_point()
x2, y2=self.get_gp(1).get_device_point()
xy = (min([x1, x2]), min([y1,y2]))
w = abs(x1-x2)
h = abs(y1-y2)
if self.getp('isotropic'):
if w<h: h=w
else: w=h
a = Rectangle(xy, w, h, facecolor='none', fill=False,
edgecolor='black', alpha=1)
lp=self.getp("loaded_property")
if lp is not None:
self.set_artist_property(a, lp[0])
self.delp("loaded_property")
a.figobj=self
a.figobj_hl=[]
a.set_zorder(self.getp('zorder'))
a._is_frameart = self.getp('frameart')
return a