Polar plots

Yes, my idea is to do it "properly", but I'm still

    > getting myself familiar with the code.

    > My original plan was to create a class
    > PolarSubplot(PolarAxes), in the same way that Subplot
    > derives from Axes. I would then create the PolarAxes
    > class, implementing all the necessary methods, like
    > plot(), imshow(), etc. That's why I mentioned imshow()
    > and pcolor(), because my idea is to implement not only
    > line plots, but specially pseudo color plots on the polar
    > axes.

    > After looking at the code for transforms, though, I'm not
    > sure if all this is really necessary. It seems to me that
    > I can define a polar transform, and simply reuse all the
    > methods already defined in the Axes class to the all the
    > work, is that right?

I believe creating a PolarAxes is the way to go. I would probably
also derive specialized Axis classes as well to handle the r and theta
axis, using a matplotlib.patches.Circle rather than a
matplotlib.lines.Line2d for the theta axis and grid lines. You would
probably also need to add a rotation property to the ticks class, do
that the ticks could be placed normal to the theta axis. I could help
out here - it might call for a new line style, one along the lines of
'_', '|' (which the current ticks use) but that could be rotated.

Once you get the axis, transformations and grids set up right, yes, I
believe you will be able to reuse many of the plotting methods. I'm
fairly certain some work will need to be done to make images, pcolors
and other plots work with though. But the basic plot and friends
should work without modification.

    > I saw the PolarXY transform in the _transforms module,
    > but it seems to be just a stub (matplotlib 0.63.0) -- it
    > has no defined methods.

Yes and no. The PolarXY class defines in _transforms.h

  // the api forward and inverse functions; theta in radians
  std::pair<double, double> operator()(const double& r, const double& theta ) {
    return std::pair<double, double>( r*cos(theta), r*sin(theta) );
  }

What is missing is a NonseparableTransformation class, developed along
the lines of the SeparableTransformation, which utilizes a FuncXY
rather than funcx and funcy. If you are not comfortable with c++ and
the pycxx extension generator package, I would be happy to add this
part. The polar axes would set a NonseparableTransformation with the
FuncXY set to PolarXY.

    > A few more details would be great. As I said, I'm still
    > looking at the code and getting used to how things
    > work. I would be very happy to contribute with
    > matplotlib, it's a fantastic work and something that was
    > missing in the Python world for quite a long time.

Great - I've been a bit out of the loop over the last week and will be
playing catch-up this week, but will try and get the transform stuff
into CVS for you ASAP so you can work on this.

Thanks,
JDH