本文整理汇总了Python中chaco.api.PlotGraphicsContext.set_line_width方法的典型用法代码示例。如果您正苦于以下问题:Python PlotGraphicsContext.set_line_width方法的具体用法?Python PlotGraphicsContext.set_line_width怎么用?Python PlotGraphicsContext.set_line_width使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类chaco.api.PlotGraphicsContext
的用法示例。
在下文中一共展示了PlotGraphicsContext.set_line_width方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: PoincarePlotFastMovieMakerWorker
# 需要导入模块: from chaco.api import PlotGraphicsContext [as 别名]
# 或者: from chaco.api.PlotGraphicsContext import set_line_width [as 别名]
#.........这里部分代码省略.........
index=index_ds,
value=value_ds,
#color_data=color_ds,
#color_mapper=color_mapper,
#fill_alpha=0.4,
color=color,
index_mapper=imapper,
value_mapper=vmapper,
marker='circle',
marker_size=self.manager.active_point_size,
line_width=0
#outline_color='white'
)
self._plot.add(self.scatter)
#self._plot.plots['var_size_scatter'] = [self.scatter]
# Tweak some of the plot properties
_title = nvl(self.manager.movie_title, "Poincare plot")
if len(_title) > 0:
self._plot.title = _title
self._plot.title_font = self.title_font
self._plot.line_width = 0.5
self._plot.padding = self.frame_pad
self._plot.do_layout(force=True)
self._plot.outer_bounds = [self.manager.movie_width,
self.manager.movie_height]
self.gc = PlotGraphicsContext(self._plot.outer_bounds,
dpi=self.manager.movie_dpi)
self.gc.render_component(self._plot)
self.gc.set_line_width(0)
self.gc.save(self._get_filename(self.p0))
self.x_mean_old = None
self.y_mean_old = None
self._time_label_font = None
return True
def plot(self, idx):
if len(self.pp_specs) == 0:
return
p = self.pp_specs[idx]
p_old = None if idx == 0 else self.pp_specs[idx - 1]
if idx > 0:
self.gc.set_line_width(0)
if not p_old == None and not p_old.mean_plus == None:
r_points = pl.array([[p_old.mean_plus, p_old.mean_minus]])
r_points = self.scatter.map_screen(r_points)
self.gc.set_fill_color((1.0, 1.0, 1.0, 1.0))
self.gc.draw_marker_at_points(r_points,
self.manager.centroid_point_size, CIRCLE)
__update_graphics_context__(self.gc, self.scatter, p, self.manager)
r_points = pl.array([[p.mean_plus, p.mean_minus]])
r_points = self.scatter.map_screen(r_points)
self.gc.set_fill_color(self.manager.centroid_color_as_tuple)
self.gc.draw_marker_at_points(r_points,