Changelog
Source:NEWS.md
ggalign 0.0.5
CRAN release: 2024-11-14
Breaking changes
direction
argument instack_layout()
/ggstack()
is soft-deprecated now, user must provide it manually.set_context
,order
, andname
arguments inalign_*()
andggheatmap()
are soft-deprecated, which is advised to useactive
argument.guides
,free_guides
,free_spaces
,free_labs
, andplot_data
arguments inalign_*()
andggheatmap()
are deprecated, which is advised to useplot_align
function instead.theme
argument inalign_*()
andggheatmap()
is deprecated, which is advised to useplot_theme
function.what
argument instack_active()
is soft-deprecated, user is advised to usestack_switch()
to change the active plot withwhat
.align_panel()
/ggpanel()
is deprecated, user is advised to useggalign(data = NULL)
instead.
New features
new
quad_layout()
to create layout allowing free from alignment.new
quad_alignv()
,quad_alignh()
,quad_free()
/ggside()
,quad_alignb()
alias forquad_layout()
.stack_layout()
now gains atype
argument to control whether the layout should align observations.new
ggoncoplot()
function to draw oncoprint.new
ggfree()
function to add ggplot to the layout.new
fortify_matrix()
function to convert any objects to a matrix, and addfortify_matrix()
method forMAF
object.new
fortify_data_frame()
function to convert any objects to a data frame.now, a special attribute
ggalign
can be used to pass additional informations across the building process, and a new functionggalign_attr()
can be used to extract the data from the attribute.new
plot_theme()
function to control the default theme of the plot in layout.new
plot_data()
function to control the data transformation of the plot in layout.new
plot_align()
function to control specifications of the plot in layout.new
with_quad()
function to control the-
operator context.new
quad_init()
function to initialize the annotation with self-provided data.new
stack_switch()
andquad_switch()
to switch active plots forstack_layout()
andquad_layout()
.new
anno_top()
,anno_left()
,anno_bottom()
andanno_right()
alias for add annotation inquad_layout()
.align_dendro()
gain a new argumentcutree
to customize the process of tree cutting.reorder_dendrogram
argument inalign_dendro()
function now can accept a function to reorder the tree.new
layer_order()
function to change the ggplot2 layer adding order.new
theme_no_axes()
function to remove axis elements.new
geom_pie()
function to draw pie charts.
Bug fixes
fix bug when apply
free_border
inalignpatches
object.fix bug when provide a function in
distance
argument ofalign_dendro()
fix bug when provide
hclust
ordendrogram
in method argument ofalign_dendro()
fix bug of
coord_ggalign()
for discrete scale
Improvements
merge
function has been implemented withvctrs
for performancefor large matrix (> 20000 cells), automatically use
geom_raster()
{data.table} is now removed from the dependency
ggalign 0.0.4
CRAN release: 2024-10-12
layout_heatmap()
/ggheatmap()
arguments width/height have been renamed.width
/.height
to helps avoid conflicts with arguments fromgeom_tile()
.the nestet alignpatches theme by default will inherit from the parent alignpatches
new
layout_title()
function, nowlayout_annotation()
only control the layout themeadd
ggrastr::rasterize
method for bothggheatmap()
andggstack()
set_context
argument inalign_dendro()
now depends onplot_dendrogram
by defaultalign_dendro()
gain a new argumentreorder_dendrogram
to control whether to reorder the generated dendrogram based on the mean values.align_reorder()
now splitted into two functionalign_order()
andalign_reorder()
dendrogram_data()
gain a new argumentreorder_branches
to control whether to reorder the inputleaf_braches
based on the tree.align_dendro()
gain new argumentmerge_dendrogram
to control whether the dendrograms in multiple groups should be mergeddendrogram height axis will be automatically reversed in bottom and left annotation stack
heatmap fill color scale now default use
scale_fill_gradient2(low = "blue", high = "red")
for continuous values.Coord
is used to set limits instead ofScale
all
free_*
arguments now accept the same argument of the correspondingfree_*
functions.new
theme_ggalign()
function for the default theme of ggalign packageexport option
ggalign.default_theme
allow user to change the global default themenew
free_guide()
function, to override the layout guides argument for single plotgeom_draw()
now utilizepatch()
function to convert objects into grobinternal changes: all vectors have been operated with
vctrs
packagestack_layout()
: gainsizes
argument to control the relative sizes of the stackalign_()*
: noworder
argument only control the plot area.align_reorder()
now can accept an ordering character names.export
order2()
functionalign_reorder()
: fun argument has been renamed toorder
argument, and it can now accept the ordering integer index directlyfun
inalign_reorder()
now can return any statistics which can be handled byorder2()
fix
ggheatmap()
order not work when put in a stack layoutmethod
inhclust2()
can now return any objects which can be coerced into hclust, or you can provide such object directly inmethod
.hclust2()
now can acceptdistance = NULL
hmanno()
,stack_active()
, andalign_*()
functions gain a new argumenttheme
to control the theme for the plot.new
layout_annotation()
andlayout_theme()
to modify the layout componentsborders
argument infree_space()
has been renamed tospaces
{tibble} is now removed from the dependency
align_plots()
now can acceptgList
,function
,recordedplot
,trellis
,pheatmap
,Heatmap
,HeatmapAnnotation
, andHeatmapList
, we have addedalignpatch
method for these objects.add
patch
method forgList
,function
,recordedplot
,trellis
,pheatmap
,Heatmap
,HeatmapAnnotation
, andHeatmapList
fix a bug in
wrap()
function where duplicated names in gtable cause some grobs missingnew
free_vp()
function to customize the viewport when aligning.StackLayout
andHeatmapLayout
methods have been collapsed into one method forLayout
classNew
Patch
class, now we can extend the alignment process of any object and customize the building process withggproto
.fix missing variable
labs
in thefree_space
method ofPatchAlignpatches
ggalign 0.0.3
CRAN release: 2024-09-15
Add package logo
new
inset()
functionadd package quotes in DESCRIPTION
add return value docs for exported function or methods
ggalign 0.0.1
Features
ggalign
pacakge provides two layout to arrange ggplot objects:
heatmap_layout()
/ggheatmap()
: Arrange ggplot into a Heatmap layout. Seevignette("heatmap-layout")
for details.stack_layout()
/ggstack()
: Arrange ggplot vertically or horizontally. Seevignette("stack-layout")
for details.
To further customize these layouts, we offer following functions:
-
align_group()
: Group layout axis into panel with a group variable. -
align_kmeans()
: Group layout axis into panel by kmeans -
align_reorder()
: Reorders layout observations based on weights or summary statistics. -
align_dendro()
: Reorder or Group layout based on hierarchical clustering
For more detailed instructions on customizing layouts, see the vignette: vignette("layout-customize")
.
Additionally, plots can be added in the layout with following functions:
-
align_gg()
/ggalign()
: Create ggplot object with a customized data. -
align_panel()
/ggpanel()
: Create ggplot object with the layout panel data.
For more information on adding plots, refer to the vignette: vignette("layout-plot")
.