Logo Search packages:      
Sourcecode: matplotlib version File versions

def matplotlib::backends::backend_ps::RendererPS::draw_path_collection (   self,
  master_transform,
  cliprect,
  clippath,
  clippath_trans,
  paths,
  all_transforms,
  offsets,
  offsetTrans,
  facecolors,
  edgecolors,
  linewidths,
  linestyles,
  antialiaseds 
)

Draws a collection of paths, selecting drawing properties from
the lists *facecolors*, *edgecolors*, *linewidths*,
*linestyles* and *antialiaseds*. *offsets* is a list of
offsets to apply to each of the paths.  The offsets in
*offsets* are first transformed by *offsetTrans* before
being applied.

This provides a fallback implementation of
:meth:`draw_path_collection` that makes multiple calls to
draw_path.  Some backends may want to override this in order
to render each set of path data only once, and then reference
that path multiple times with the different offsets, colors,
styles etc.  The generator methods
:meth:`_iter_collection_raw_paths` and
:meth:`_iter_collection` are provided to help with (and
standardize) the implementation across backends.  It is highly
recommended to use those generators, so that changes to the
behavior of :meth:`draw_path_collection` can be made globally.

Reimplemented from matplotlib::backend_bases::RendererBase.

Definition at line 509 of file backend_ps.py.

                                                      :
        write = self._pswriter.write

        path_codes = []
        for i, (path, transform) in enumerate(self._iter_collection_raw_paths(
            master_transform, paths, all_transforms)):
            name = 'p%x_%x' % (self._path_collection_id, i)
            ps_cmd = ['/%s {' % name,
                      'newpath', 'translate']
            ps_cmd.append(self._convert_path(path, transform))
            ps_cmd.extend(['} bind def\n'])
            write('\n'.join(ps_cmd))
            path_codes.append(name)

        for xo, yo, path_id, gc, rgbFace in self._iter_collection(
            path_codes, cliprect, clippath, clippath_trans,
            offsets, offsetTrans, facecolors, edgecolors,
            linewidths, linestyles, antialiaseds):

            ps = "%g %g %s" % (xo, yo, path_id)
            self._draw_ps(ps, gc, rgbFace)

        self._path_collection_id += 1

    def draw_tex(self, gc, x, y, s, prop, angle, ismath='TeX!'):


Generated by  Doxygen 1.6.0   Back to index