TODO

Get rid of dl.summarize and gapply.fun for simplicity?

how to automatically adjust axes to make direct labels immediately
legible? For multipanel plots you would have to adjust all the scales!

method for .zoo plots?

handling custom # of bins/custom densityplot params?

problems with plotting color labels in lattice when col= is specified,
see etc/individual.R

see etc/xYplot.R for a problem with plotting some weird trellis
objects.

contourplot labels as in lattice::panel.contourplot or C source code
in r-source/src/main/plot3d.c

2.4 --- 5 March 2012

Suggest nlme to avoid warning on pkg check.

require(proto) in geom_dl to avoid error if it is called without
direct.label.ggplot

2.3 --- 2 March 2012

In apply.method, we look at all groups and determine which columns are
invariant in each, then after the Positioning Function is applied, we
write these values to the resulting data.frame if it does not contain
these variables. That way each individual Positioning Method doesn't
have to worry about keeping track of all the weird annotation columns
that can be there on input.

Works with ggplot2 0.9.0, including new simplified hiding of the
legend, using guides(colour="none")

dlgrobs have names == GRID.dlgrob.method if method is a character
string.

Tiebreaking for qp.labels when we are doing lineplots.

2.2 bugfixes

ggplot2 autopicker simpler.

use aes_string instead of aes in direct.label.ggplot

2.1 31 August 2011 -- bugfixes

gapply can take positional arguments like gapply(d,subset,y==max(y))

melt is no longer used in top.bumptwice

2.0 29 August 2011

dl.move and static.labels allow specification of label positions in
terms of the displayed axes! Internally, they convert the
user-specified numbers to cm.

Figured out how to calculate label bounding boxes for ggplot2, by
returning dlgrobs from the draw() method of the new
GeomDirectLabel. The special drawDetails.dlgrob method is called
within the plotting viewport, so we can calculate the bounding boxes
of the text before they are drawn.

In fact all Positioning Methods which take into account visual
distance need to calculate visual distance instead of plotting
coordinate distance. ie smart.grid tries to find the label position
which is closest to the center, but this can be very skewed if x and y
axes are not on the same scale. This is now fixed since all
coordinates are converted to cm before being passed to Positioning
Methods.

fontface and fontfamily for direct labels are now supported even on
ggplot2, thanks to the new dlgrob backends! See example(dlcompare).

1.4

if(require(pkg)) in examples so you can see the rest even if you don't
have pkg

1.3

delete empty.grid.fun ... now to use empty.grid, do i.e.
list("get.means","empty.grid") 
for labels with target points at the means of each point cloud.

ignore.na Positioning Method for removing rows with NA x or y. This is
applied before all Positioning Methods in label.positions().

no longer depend on ggplot2/proto for further modularity.

gapply function for applying a Positioning Method to each group, also
eliminates need to depend on plyr.

dl.indep -> gapply.fun

eval.list -> apply.method 

path example datasets.

redo ggplot2 backend --- analyze layers to determine which has the
color.

Respect predefined scale_colour_manual() in ggplot2:
http://stackoverflow.com/questions/3337765/can-i-use-direct-label-with-ggplots-scale-colour-manual
I tried to do a hack that looks into p$scales$.scales to turn off the
legend (r371), but that didn't work so well, so I went back to the
method of just adding a new scale_colour_discrete(legend=FALSE) (r382)
You could always set the scale_colour_manual AFTER the call to direct.label():
p <- ggplot(...)
p2 <- direct.label(p)
p2+scale_colour_manual(...,legend=FALSE)
As of r400 I do analysis of the layers of the ggplot object, and turn off
 the color legend off if there was one. Thus this should be equivalent:
p <- ggplot(...)+
  scale_colour_manual(...)
direct.label(p)

1.2 Positioning Function -> Positioning Method.

1.1 26 nov 2010 delete many examples so CRAN check completes quicker.

1.0 16 nov 2010 initial release attempted to CRAN -- too many examples.
