本文整理汇总了Python中chaco.api.PlotGraphicsContext.set_fill_color方法的典型用法代码示例。如果您正苦于以下问题:Python PlotGraphicsContext.set_fill_color方法的具体用法?Python PlotGraphicsContext.set_fill_color怎么用?Python PlotGraphicsContext.set_fill_color使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类chaco.api.PlotGraphicsContext
的用法示例。
在下文中一共展示了PlotGraphicsContext.set_fill_color方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: PoincarePlotFastMovieMakerWorker
# 需要导入模块: from chaco.api import PlotGraphicsContext [as 别名]
# 或者: from chaco.api.PlotGraphicsContext import set_fill_color [as 别名]
#.........这里部分代码省略.........
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,
self.manager.centroid_point_size, CIRCLE)
#self.gc.save_state()
self._draw_time_text(self.gc, p)
self.gc.save_state()
if self.manager.movie_frame_step > 0 and idx > 0:
# only frames module movie_frame_step are generated
if not self.manager.movie_frame_step % idx == 0:
return
if self.manager.movie_identity_line:
__draw_identity_line__(self.gc, self.value_max, self.scatter)
self.gc.save(self._get_filename(p))
def _draw_time_text(self, gc, pp_spec):
if self.manager.movie_create_time_label == False:
return
if pp_spec.level == 0:
(H, M, S) = get_time_label_parts_for_miliseconds(0,
hour_label=self.manager.movie_hour_label,
minute_label=self.manager.movie_minute_label,