ggpubr 0.2 2018-11-15

Bug fixes

  • P-value for multiple comparisons by group (stat_compare_means()) are now correctly displayed (@elisheva100, #135.

ggpubr 0.1.9 2018-11-11

Minor changes

  • ggsci palettes have been updated to add new palettes: nejm, jama, ucscgb, d3, locuszoom, igv, startrek, tron, futurama, simpsons (@cbrueffer, #118

Bug fixes

  • The option was only considered when the grouping variable contains more than two levels. In that case, each level is compared against the specified reference group. Now, option is also considereded in two samples mean comparisons (@OwenDonohoe, #118)

  • Now, ggqqplot() reacts to the argument (@vsluydts, #123
  • Added error bar color is now inherited from the main plot (@JesseRop, #109

ggpubr 0.1.8 2018-08-30

New features

Minor changes

Bug fixes

  • Now, ggscatter() can remove the letter ‘a’ from the legend, when the argument show.legend.text = FALSE specified @atsyplenkov, #106.
  • Now, adding a size option to ggscatter add.params is supported @retrogenomics, #94.

ggpubr 0.1.7 2018-06-23

New features

Minor changes

Bug fixes

  • In ggscatterhist() the x variable was plotted two times, on both the plot x & y margins, instead of having, as expected, a) the x variable on the main plot x margin and 2) the y variable on the main plot y margin. This has been now fixed.
  • In previous version, ggdotchart() sorted automatically within groups when the color argument is specified, even when groups = NULL. This default behaviour has been now removed. Sorting withi groups is performed only when the argument group is specified (@sfeds, #90).
  • Now, and work with NAs (@j3ypi, #89).

ggpubr 0.1.6 2017-11-14

New features

  • New function ggballoonplot() added to visualize a contingency table.

  • ggdotchart() can be now used to plot multiple groups with position = position_dodge() (@ManuelSpinola, #45).

  • New function ggscatterhist() to create a scatter plot with marginal histograms, density plots and box plots.

  • New theme theme_pubclean(): a clean theme without axis lines, to direct more attention to the data.

  • New arguments in ggarrange() to customize plot labels (@G-Thomson, #41):
    • font.label
    • label.x and label.y
    • hjust and vjust
  • New argument method.args added to stat_compare_means(). A list of additional arguments used for the test method. For example one might use method.args = list(alternative = “greater”) for wilcoxon test (@Nicktz, #41).

  • New argument symnum.args added to stat_compare_means(). A list of arguments to pass to the function symnum for symbolic number coding of p-values. For example, symnum.args <- list(cutpoints = c(0, 0.0001, 0.001, 0.01, 0.05, 1), symbols = c("****", "***", "**", "*", "ns"))

  • New functions table_cell_font() and table_cell_bg() to easily access and change the text font and the background of ggtexttable() cells (@ProbleMaker, #29).

  • New argument numeric.x.axis in ggline(). logical. If TRUE, x axis will be treated as numeric. Default is FALSE. (@mdphan, #35)

  • New argument lab.nb.digits in ggbarplot(). Integer indicating the number of decimal places (round) to be used (#28). Example: lab.nb.digits = 2.

  • New argument tip.length in stat_compare_means(). Numeric vector with the fraction of total height that the bar goes down to indicate the precise column. Default is 0.03. Can be of same length as the number of comparisons to adjust specifically the tip lenth of each comparison. For example tip.length = c(0.01, 0.03).

Minor changes

  • Now get_legend() returns NULL when the plot doesn’t have legend.

Bug fixes

ggpubr 0.1.5 2017-08-22

Minor changes

  • In ggpar(), now legend.title can be either a character vector, e.g.: legend.title = “Species” or a list, legend.title = list(color = "Species", linetype = "Species", shape = "Species").

  • New argument ellipse.border.remove in ggscatter() to remove ellipse border lines.

ggscatter(mtcars, x = "mpg", y = "wt", 
          color = "cyl",
          ellipse = TRUE, mean.point = TRUE, 
          ellipse.border.remove = TRUE)

Bug fixes

ggpubr 0.1.4 2017-06-28

New features

Minor changes

  • In gghistogram(), density curve and rug react to the fill color.
  • ggarrange():
    • New argument àlign to specify whether graphs in the grid should be horizontally (“h”) or vertically (“v”) aligned.
    • New argument legend to remove or specify the legend position when arranging multiple plots.
    • New argument common.legend to create a common unique legend for multiple plots.

ggpubr 0.1.3 2017-06-06

New features

Major changes

  • New arguments in ggpubr functions, see ggboxplot(), ggdotplot(), ggstripchart(), ggviolin(), ggbarplot() and ggline:
    • combine added to combine multiple y variables on the same graph.
    • merge to merge multiple y variables in the same ploting area.
    • select to select which item to display.
    • remove to remove a specific item from a plot.
    • order to order plot items.
    • label, font.label,, repel, label.rectangle to add and customize labels
    •, panel.labs and short.panel.labs: support for faceting and customization of plot panels
  • New argument grouping.vars in ggtext(). Grouping variables to sort the data by, when the user wants to display the top n up/down labels.

  • New arguments in theme_pubr():
    • border,
    • margin,
    • legend,
    • x.text.angle

Minor changes

  • Now, the argument palette Can be also a numeric vector of length(groups); in this case a basic color palette is created using the function grDevices::palette().

ggpubr 0.1.2 2017-03-14

New features

  • New function get_palette() to generate a palette of k colors from ggsci palettes, RColorbrewer palettes and custom color palettes. Useful to extend RColorBrewer and ggsci to support more colors.

Minor changes

  • Now the ggpar() function can handle a list of ggplots.
  • Now the default legend position is right.
  • New argument show.legend.text in the ggscatter() function. Use show.legend.text = FALSE to hide text in the legend.
  • New arguments title, submain, subtitle, caption, font.submain, font.subtitle, font.caption in the ggpar() function.
  • New argument in ggscatter().

Bug fixed

  • The mean within group for ggdensity (gghistogram) are now shown if data have NA values @chunkaowang, #1

ggpubr 0.1.1 2016-12-05

New features

  • New function ggtext() for textual annotation.
  • New argument star.plot in ggscatter(). A logical value. If TRUE, a star plot is generated.
  • New helper function geom_exec(). A helper function used by ggpubr functions to execute any geom_xx functions in ggplot2. Useful only when you want to call a geom_xx function without carrying about the arguments to put in ggplot2::aes().
  • New arguments sort.val and top in ggbarplot().
    • sort.val: a string specifying whether the value should be sorted. Allowed values are “none” (no sorting), “asc” (for ascending) or “desc” (for descending).
    • top: a numeric value specifying the number of top elements to be shown.
  • New function theme_classic2() added. Classic theme with axis lines.

Minor changes

# Example
  • Now, in gghistogram(), when add_density = TRUE, y scale remains = “..count..”.
  • Now, default theme changed to theme_classic2()
  • Default point size and line size set to NULL

ggpubr 0.1.0 2016-07-20

Plot one variable - X: Continuous

  • ggdensity(): Density plot
  • gghistogram(): Histogram plot
  • ggecdf(): Empirical cumulative density function
  • ggqqplot(): QQ plots

Plot two variables - X & Y: Discrete X and Continuous Y

  • ggboxplot(): Box plot
  • ggviolin(): Violin plot
  • ggdotplot(): Dot plot
  • ggstripchart(): Stripchart (jitter)
  • ggbarplot(): Bar plot
  • ggline(): Line plot
  • ggerrorplot(): Error plot
  • ggpie(): Pie chart
  • ggdotchart(): Cleveland’s dot plots

Plot two continuous variables

  • ggscatter(): Scatter plot

Graphical paramters

  • ggpar(): Change graphical parameters
  • show_line_type(): Line types available in R
  • show_point_shapes(): Point shapes available in R
  • theme_pubr(): Create a publication ready theme
  • labs_pubr(): Format only plot labels to a publication ready style


  • ggmaplot(): MA-plot from means and log fold changes


  • diff_express: Differential gene expression analysis results


  • desc_statby(): Descriptive statistics by groups
  • stat_chull(): Plot convex hull of a set of points
  • stat_conf_ellipse(): Plot confidence ellipses
  • stat_mean(): Draw group mean points