agg.path_storage.arc_to problem

Hi, Exploring the agg.py module of the matplotlib library, I

    > have encauntered that I cannot represent smooth arcs. For
    > example, circle appears as octagon. Could you give me an
    > idea how to manage this and what is the reason for such
    > behaviour? Here is the code of the agg_test.py changed to
    > draw arc, but not giving the desired result:

You have to call conv_curve on the path, and then stroke the result of
that

  curve = agg.conv_curve_path(path)
  stroke = agg.conv_stroke_curve(curve)

agg is a heavily templated library, and one or the challenges of
wrapping a template library is deciding which template combinations
need to be instantiated. Since matplotlib's agg wrapper is
undocumented, I'll explain some of the combinations and the naming
convention now. In the agg C++ library, the equivalent calls are
  
  typedef agg::conv_stroke<path_t> stroke_t;
  typedef agg::conv_curve<path_t> curve_t;
  agg::conv_curve<path_t> curve(path);
  agg::conv_stroke<curve_t> stroke(curve)

matplotlib basically takes the template argument and appends it to the
class name, eg

Agg C++ : matplotlib wrapper :
agg::conv_curve<path_t> agg.conv_curve_path
agg::conv_stroke<curve_t> agg.conv_stroke_curve

The typedefs (path_t, curve_t, etc) are defined in swig/agg_typedefs.h
in the swig directory of the matplotlib src distribution. The various
curves are defined in swig/agg_conv_curve.i and the strokes in
swig/agg_conv_stroke.i

The stroke and converter classes thus defined are

  conv_curve_path - convert path to curve, maps "path"->"curve"
  conv_curve_trans - convert a transformed path, maps "transpath"->"curvetrans"
  conv_stroke_path - stroke a path
  conv_stroke_transpath - stroke a transpath
  conv_stroke_curve - stroke a curve
  conv_stroke_transcurve - stroke a transform of a curve
  conv_stroke_curvetrans - stroke a curve of a transformed path

Hope this helps,
JDH