See NEWS for changes in latest version

ggplot2 0.6
----------------------------------------

The two big changes in this release are improved documentation and legends.  

 * all major ggplot2 components now have their own built in documentation, so that (e.g.) ?stat_smooth or ?geom_point now give you useful information
 
 * the legend code is now considerably more sophisticated and will attempt to merge together legends for the same variable
 
 * also, legends are drawn based on the geoms used (instead of the scales used, as previously) so should match the plot much better (e.g. for geom_smooth, geom_boxplot, geom_vline, geom_abline, geom_pointrange).
 
These features are new, so there are likely to be a few bugs that I haven't discovered.  Please me know if you discover any.
 
Other additions and corrections

  * coord_equal: should now work correctly in all situations
  * coord_polar: add start and direction parameters, giving more control over the layout of the polar coords
  * coord_polar: added my favourite pie chart example
  * coord_trans now deals with groups appropriately, at the cost of decreased speed
  * geom_abline, geom_vline, geom_hline: should now behave better in a wider variety of settings
  * geom_boxplot: deals with continuous x-axis and grouping much better
  * geom_boxplot: now has it's own legend which actually looks like a boxplot
  * geom_boxplot: reports if missing values removed
  * geom_crossbar: the middle line is now display thicker than the other lines, controlled by the parameter fatten (thanks to Heike Hofmann for the suggestion)
  * geom_density: fix scale adjustment bug in geom_density
  * geom_line, geom_text: all size measurements (now lines and text as well) are measured in mm, lines/paths default to paths 0.5mm wide
  * geom_rug: new to add marginal rug plots
  * geom_smooth: added example showing how to use geom_smooth with your own models
  * geom_smooth: fixed bug where if se=FALSE x axis always includes 0
  * geom_vline, geom_hline: yet another rewrite which should make them more powerful and less error prone.  
  * ggsave reports width and height of saved image
  * position_stack: fixed bug when data was empty
  * qplot: allow qplot to use computed aesthetics too
  * scale_continuous: tweaks to minor breaks to make appearance better on wider range of coordinate systems
  * scale_discrete: all discrete scales now have labels argument which you can use to override the factor levels
  * scale_discrete: now works correctly with character vectors
  * scale_size: changed default range to [0.5, 3] to better reflect new sizing decisions
  * scale_size: legends resize to avoid overlaps
  * scale_x_continuous, scale_y_continuous: new convenience functions xlim and ylim (and zlim) that make it even easier to adjust the limits of the x, y, and z axes
  * stat_bin, geom_area: fixed bug in combination of stat_bin and geom_area that made it difficult to draw frequency polygons
  * stat_bin: fixed bug which resulted in increased counts when the x axis was a categorical variable with a single level (thanks to Bob Muenchen for pointing this out!)
  * stat_bin: no longer incorrectly warns that binwidth is unspecified when breaks are set
  * stat_bin: now takes origin argument to manually specify origin of first bin (default is round_any(min(range), bin_width, floor))
  * stat_boxplot, stat_contour, stat_density_2d, stat_qq, stat_density: na.rm parameter added to the following statistics (thanks to Leena Choi for suggesting this)
  * stat_function: new, makes it easy to superimpose a function on the plot
  * stat_qq: axes flipped to agree with base R
  * stat_qq: now uses sample aesthetic to select variable for summary
  * stat_quantile: updated to work with latest version of quantreg
  * stat_spoke: new, to make it possible to use geom_segment parameterised by angle and radius (thanks to Jiho for the suggestion)
  * stat_summary: better documentation
  * stat_summary: convenient auto wrapping of simple summary functions

Miscellaneous changes:

  * it's now easy to change the default scales (and their arguments) with the set_default_scale function, see ?set_default_scale for more details (thanks to Bob Muenchen for the suggestion)
  * new order aesthetic which controls the order in which elements are plotted
  * min and max are now scaled the same way as y
  * functions are silently dropped (e.g. aes(colour=col))
  * scales do not try and map variables that don't exist (fixes some rather obscure bugs)
  * aes(mpg, wt) is now equivalent to aes(x = mpg, y = wt)


ggplot2 0.5.7
----------------------------------------

New geoms, scales and aesthetics

  * stat_step and geom_step to draw staircase plots (like plot(type="s"))
  * order aesthetic (currently only for lines/paths) allows you to control the drawing order within a group
  * scale_manual makes it easier to let ggplot uses the exact colours/sizes/linetypes that you want
  * scale_reverse allows you to reverse the scale of x and y axes
  * scale_grey is a new black and white scale for categorical data (colour and fill)


Improved options handling

  * new function opts() to allow modification of plot options by addition
  * update(p, theme_bw) and p + theme_bw now work

These changes mean that you can modify plot options in the same way that you modify all other aspects of the plot, e.g.  qplot(mpg, wt, data=mptcars) + opts(title = "Fuel economy vs weight")

Improved documentation

  * many tweaks to the online documentation, particular including the actual code you need to run for each object!
  * every page now has a link to a form where you can submit feedback on exactly you do or don't like about a page
  * required aesthetics now listed in documentation
  * geom_polygon now has a decent example
  * numerous minor corrections suggested by Jörg Beyer
  * separated plotting advice from details of plot construction (what vs how), thanks to Bert Gunter for this suggestion


Improved map projections (with coord_map)

  * coord_map defaults to orientation = c(90, 0, mean(range(y))) - this ensures that multiple layers line up correctly, but means you will have to specify the orientation yourself for many projections 
  * coord_map now respects limits set by scales
  * removed useless ticks from coord_map

If you're using ggplot to draw maps and have thought of other features that would make your life easier, please let me know.


Bug fixes

  * adding data and aesthetics in separate steps should now work
  * layers with set parameters will not use mapped aesthetics
  * use LazyLoad: false instead of SaveData: true for better future compatability

  * coord_cartesian: fixed bug that prevented you from overriding the default axis expansion
  * coord_equal: now scales correctly if ratio < 1
  * geom_abline: fix bug where slope was ignored
  * geom_jitter now works correctly with groups and categorical values (was actually a bug in how scale_discrete deals with continuous values)
  * geom_path: automatically switch between polylineGrob and segmentsGrob when drawing paths so that setting line type now works properly
  * geom_segment now uses both ends of segments to calculate axis limits
  * plotmatrix: fix bug in scatterplot matrix where all scatterplots were transposed!
  * qplot: should now work better within functions
  * quickplot added as an alias of qplot, to avoid confusion with qunif, etc
  * scale_*: better error message if you add a scale without a matching aesthetic mapping in the plot
  * scale_identity no longer converts everything to character
  * scale_identity: grob argument renamed to guide
  * stat_*: made all statistics more robust to errors
  * stat_quantile: fixed bug when only drawing a single quantile
  * stat_smooth: returns silently if <2 non-missing data points


Minor aesthetic improvements

  * coord_polar now specifies aspect.ratio by default, and I've made a few other tweaks to make polar coordinates plot look nicer
  * geom_bar no longer draws gray borders by default, but instead uses the same colour as fill (this eliminates a tiny gap between neighbouring bars)
  * plotmatrix: tweaks to improve display of scatterplot matrix
  * scale_brewer: added option to reverse palette
  * scale_colour: colour and fill legends now look exactly the same (previously colour was missing a grey border)
  * scale_discrete has slightly larger expansion (0.75 vs 0.5)
  * stat_bar: only output bars with > 0 count


ggplot2 0.5.6
----------------------------------------

Improved error messages and other notifications:
  * all geoms and position adjustments should now give an informative error message when required aesthetics are missing
  * better error messages if data not a data frame, or mapping not created by aes or aes_string
  * better errors for qplot when variables missing or data invalid
  * better error if somehow you are missing necessary scales
  * stat_bin informs you of the default choice of binwidth
  * stat_smooth gives helpful error messages for common problems
  * printing a geom now displays the data set that it uses (if not the default)

Other improvements:
  * colour and fill legends now surround by background plot colour
  * can now draw arrow heads with geom_segment, and have added an example demonstrating drawing a vector field
  * density plots should always include 0 on y axis
  * default boxplot outlier changed colour to black
  * stat_smooth supports categorical variables a little better
  * implemented hash methods for all ggplot objects.  This is the first step in making it easier for me to compare all examples between versions for quality control purposes

New data:
  * seals, contributed by David Brillinger and Charlotte Wickham, used for vector field example

Bug fixes:
  * geoms hline, vline and abline now all work correctly when a grouping variable is used
  * block histograms (where individuals are identifiable) now work correctly  
  * all ggplot objects should now print properly from the command line
  * fixed bug in geom_path when only 1 point
  * segments geom now works correctly for more coordinate systems
  * order variables in scatterplot matrix by order of variables in data.frame
  * geom_density deals with missing values correctly when displaying scaled densities
  * fixed bug in calculating categorical ranges
  * fixed bug in drawing error bars

Subtractions
  * now relies on R 2.6
  * removed grid.gedit and grid.gremove, and code replaced by grid.ls

ggplot2 0.5.5
----------------------------------------

Improvements:
  * ggplot now gives rather more helpful errors if you have misspecified a variable name in the aesthetic mapping
  * changed default hline and vline intercepts to 0
  * added "count" output variable from stat_density for creating stacked/conditional density plots
  * added parameters to geom_boxplot to control appearance of outlying points
  * overriding aesthetics with fixed values that have already been set with aesthetics now actually works
  * slightly better names for xaxis and yaxis grobs
  * added aes_string function to make it easier to construction aesthetic mapping specifications in functions
  * continuous scales now have labels argument so that you can manually specify labels if desired
  * stat_density now calculates densities on a common grid across groups.  This means that position_fill and position_stack now work properly
  * if numeric, legend labels right aligned
  * polar coordinates much improved, and with better examples

Documentation:
  * fixed argument documentation for qplot
  * added (very) rudimentary documentation about what functions return
  * documentation now lists extra variables created by statistics

Bug fixes:
  * coord_flip now works with segment and all interval geoms
  * geom_errorbar now works in all coordinate systems
  * derived y axes (eg. on histogram) are now labelled correctly
  * fixed bug in stat_quantile caused by new output format from predict.rq
  * fixed bug if x or y are constant
  * fixed bug in histogram where sometimes lowest bar was omitted
  * fixed bug in stat_qq which prevent setting aesthetics
  * fixed bug in qplot(..., geom="density", position="identity")
  * fixed stat_qq so that unnecessary arguments are no longer passed to the distribution function

Subtractions:
  * removed grid argument from ggsave, replaced by ggtheme(theme_bw)
  * removed add argument from qplot


ggplot2 0.5.4
----------------------------------------

  * border now drawn on top of geoms, instead of below - this results in better appearance when adjusting scale limits
  * ggplot() + aes() now modifies existing default aesthetic mapping, rather than overwriting
  * polish examples in facet_grid

ggplot2 0.5.3
----------------------------------------

  * added experimental scatterplot matrix, see ?plotmatrix
  * added new border.colour and grid.minor.colour options for better control over plot apperance
  * updated theme_bw to do better when drawing a plot with white background 
  * better default colour choices for gradients (and more discussion in examples)
  * fixed bug in ScaleGradient2 where scales with different positive and negative ranges were not scaled correctly
  * allow expressions as result from strip.text
  * fixed rare bug in geom_vline and geom_hline
  * fixed example in geom_abline
  * tweaked display of multiline axis labels

ggplot2 0.5.2
----------------------------------------

  * add argument to position dodge so it's now possible to accurately dodge things with different widths to their physical widths 
  * added median summary
  * new examples:
    * logistic regression example in stat_smooth
  * bugs fixed:
    * evaluation of arguments to layer is no longer delayed
    * can use categorical xseq with stat_smooth
    * x and y axes named incorrectly (thanks to Dieter Menne for spotting this)
    * can now pass position objects to qplot
    * y jitter calculated correctly, and jittered data rescales axis now
    * removed silly legend from quantile plot
    * extra arguments not being passed on to geoms/stats
    * fixed bug in stat_summary when summarising a factor
    * fixed bugs in stat_summary, geom_ribbon, and coord_trans examples

ggplot2 0.5.1
----------------------------------------

  * renamed scale_manual to scale_identity to map position_identity and stat_identity
  * ensured all grob consistently named
  * renamed aesthetics argument to mapping to be consistent with description in book
  * added useful utilities for modifying grobs
  * bug fixes to x axis range with interval geoms
  * added ability to turn legend off for single scale (currently undocumented)
  * added economics data set and matching examples

ggplot2 0.5
----------------------------------------

 * complete rewrite of ggplot code base

 * id/grouping completely rewritten so that automatically grouped when any of the aesthetics is a categorical variable.  This behaviour is defined in the Grammar of Graphics, and makes things like qplot(wt, data=mtcars, geom="density", colour=factor(cyl)) work nicely
