ggtern 2.0 now available

Recently ggplot2 received a severe makeover by releasing version 2.0, and in the spirit of improvement, I thought ggtern should also get an overhaul, so after a few-hundred hours of code review, here is what has changed:

Theme elements:

Previously, the nomenclature scheme for the new theme elements was a bit all over the shop, so the theme elements have been renamed. Every custom theme element for this package begins with ‘tern.XXX’ such as ‘tern.panel.background’ or ‘tern.axis.clockwise’, for the full list of new theme elements, see the help file: ?theme_elements

Approved Geometries:

ggplot2 v2.0 has many new geometries, and not all of them are relevant to ggtern, so like before, this package has an opt-in policy where only certain geometries are approved: geom_point, geom_path, geom_line, geom_label geom_text, geom_jitter, geom_polygon, geom_segment, geom_count and geom_blank.

New Geometries:

ggtern 2.0 carries over the existing geometries, and also ads a few more, the full list is as follows: geom_Tline, geom_Rline, geom_Lline, geom_errorbarT, geom_errorbarL, geom_errorbarR, geom_density_tern, geom_confidence_tern, geom_mask, geom_smooth_tern, geom_Tisoprop, geom_Lisoprop, geom_Risoprop and geom_interpolate_tern

Stats and Positions:

The full list of approved stats are as follows: stat_identity, stat_confidence, stat_density_tern, stat_smooth_tern, stat_sum, stat_unique, and stat_interpolate_tern whilst the approved positions are as follows: position_identity, position_nudge_tern and position_jitter_tern

Rebuilt Plot Arrangement Routine

The ggptern plot assembly routine has been completely re-written, the layout is much more predictable, one of the main achievements was providing the ability to rotate and shift the diagrams quite easily, here is an example:

ggtern_rotation

Use of Orthonormal Basis

Several of the routines use isometric-logratio basis transformations, here is an example, using a new data-set included in the package, here we shall demonstrate the implementation of the new clipping mask, and two variants of the density estimate, the first applying density on the cartesian space, and the (now) default, isometric-logratio basis.

ggtern_basis

Additional Labels

There are a few more labels and convenience functions which can be applied for additional customisation, here let us demonstrate the interpolation geometry, isolines, the automatic latex format parsing, the different labels for the precession arrows to the apex labels, and the legend positioning convenience function:

ggtern_convenience

A Final Note

So the above is some of the new features, if you have any feedback, post a comment immediately below, the user manual can be found HERE. I probably spent a couple-of-hundred hours preparing this release, essentially re-writing the entire package to work with the new ggplot2 version, so, if this package makes your life easier and produces diagrams of publication quality, any kind of donation would be highly appreciated.

Facebooktwittergoogle_plusredditlinkedinmail
Tags:,
Comments
  1. Fabio
    • Nicholas Hamilton
  2. Ludwik
    • Nicholas Hamilton
      • Ludwik
        • Nicholas Hamilton
  3. Daniel
    • Nicholas Hamilton
  4. Teja
    • Nicholas Hamilton
  5. Johannes
  6. Thomas
    • Nicholas Hamilton
  7. Mohit
  8. Caitlin
    • Nicholas Hamilton
  9. Mikey
  10. Nicolas Vereecken
  11. G
    • Nicholas Hamilton
  12. monkey
    • Nicholas Hamilton
  13. monkey
  14. monkey

Leave a Reply

Your email address will not be published. Required fields are marked *