Learn R Programming

zenplots

Plotting paths to data enlightenment

  • Online documentation is available here

The package zenplots (zigzag expanded navigation plots) displays high-dimensional data by laying out alternating one- and two-dimensional plots in a zigzag-like pattern where adjacent axes share the same variate.

Zenplots are especially useful when subsets of pairs can be identified as of particular interest by some measure, or as not meaningfully comparable, or when pairs of variates can be ordered in terms of potential interest to view, or the number of pairs is too large for more traditional layouts such as a scatterplot matrix. They also allow an essentially arbitrary layout of plots.

High dimensional space can be explored in a zenplot (zenplot()) by navigating through lower dimensional subspaces along a zenpath (zenpath()) which orders the dimensions (i.e. variates) visited according to some measure of interestingness; see Hofert and Oldford (2018)) for an application to S&P 500 constituent data or Hofert et al (2019) for application to visualizing dependence between two sets of variates. See Hofert and Oldford (2020) in Journal of Statistical Software for algorithms.

The R package zenplots provides compact displays for high-dimensional data via the notion of zenplots, grouping of variates, and customizable displays of zigzag layouts. It accommodates different graphical systems including the base graphics package, the grid package (and hence packages like ggplot2), and the interactive graphical package loon.

zenplots handles groups of variates, partial and fully missing data, and more.

One important feature is that zenplot() and its auxiliary functions in zenplots distinguish layout from plotting which allows one to freely choose and create one- and two-dimensional plot functions; predefined functions are exported for all graphical systems.

Try it.

Become one with your data!

Copy Link

Version

Install

install.packages('zenplots')

Monthly Downloads

278

Version

1.0.6

License

GPL-2 | GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

November 7th, 2023

Functions in zenplots (1.0.6)

check_zargs

Checking whether certain arguments appear in zargs
convert_occupancy

Converting an Occupancy Matrix
boxplot_1d_grid

Boxplot in 1d using the grid package
axes_2d_loon

Axes arrows in 2d using the interactive loon package
boxplot_1d_graphics

Box plot in 1d using R's base graphics
connect_pairs

Connecting Possibly Overlapping Pairs Into a List of Paths
burst_aux

Auxiliary function for burst()
burst

Splitting an Input Object into a List of Columns
de_elect

German Election Data from 2002 and 2005
density_1d_graphics

Density plot in 1d using R's base graphics
get_layout

Compute the layout of the zen plot
extract_pairs

Extract Pairs from a Path of Indices
density_1d_grid

Density plot in 1d using the grid package
boxplot_1d_loon

Boxplot in 1d using the interactive loon package
extract_1d

Extracting information for our default/provided plot1d()
extract_2d

Extracting information for our default/provided plot2d()
graph_pairs

Turn pairs or paths into a graph
density_1d_loon

Density plot in 1d using the interactive loon package
density_2d_graphics

Density plot in 2d using R's base graphics
get_path

Computing the path according to the provided method
groupData

Splitting a Matrix into a List of Matrices
group_2d_loon

Plot of labels indicating adjacent groups using the interactive loon package
get_zigzag_turns

Compute turns for zigzag
happiness

World Happiness Data Set
label_1d_graphics

Label plot in 1d using R's base graphics
l_ispace_config

Configuring a loon plot to accommodate ispace
label_1d_grid

Label plot in 1d using the grid package
label_1d_loon

Label plot in 1d using the interactive loon package
hist_1d_graphics

Histogram as 1d plot using R's base graphics
is.standard

Check Argument for Being a Vector, Matrix, Data Frame or a List of such
jitter_1d_graphics

Jittered dot plot in 1d using R's base graphics
layout_1d_graphics

Layout plot in 1d
label_2d_loon

Label plot in 2d using the interactive loon package
layout_2d_grid

Layout plot in 2d using the grid package
lines_1d_graphics

Line plot in 1d using R's base graphics
layout_2d_graphics

Layout plot in 2d
layout_2d_loon

Layout plot in 2d using the interactive loon package
density_2d_grid

Density plot in 2d using the grid package
density_2d_loon

Density plot in 2d using the interactive loon package
lines_1d_loon

Lines plot in 1d using the interactive loon package
lines_1d_grid

Lines plot in 1d using the grid package
n2dcols_aux

Auxiliary Function for Constructing Default n2dcols
move

Determine the new position when moving from the current position in a given direction
indexData

Indexing a Matrix or Data Frame According to Given Indices
hist_1d_loon

Histogram in 1d using the interactive loon package
hist_1d_grid

Histogram in 1d using the grid package
layout_1d_loon

Layout plot in 1d using the interactive loon package
layout_1d_grid

Layout plot in 1d using the grid package
points_2d_loon

Point plot in 2d using the interactive loon package
points_1d_graphics

Dot plot in 1d using R's base graphics
plot_region

Function to set up the plot region for graphics plots
num_cols

Determine the number of columns if is.standard(x)
olive

Olive Oil Data Set
group_2d_graphics

Plot of labels indicating adjacent groups using R's base graphics
group_2d_grid

Plot of labels indicating adjacent groups using the grid package
rect_1d_loon

Rectangle plot in 1d using the interactive loon package
rect_1d_grid

Rectangle plot in 1d using the grid package
qq_2d_graphics

Quantile-quantile plot in 2d using R's base graphics
points_1d_grid

Dot plot in 1d using the grid package
points_1d_loon

Dot plot in 1d using the interactive loon package
jitter_1d_grid

Jittered dot plot in 1d using the grid package
rect_2d_grid

Rectangle plot in 2d using the grid package
rect_2d_graphics

Rectangle plot in 2d using R's base graphics
jitter_1d_loon

Jittered dot plot in 1d using the interactive loon package
points_2d_graphics

Point plot in 2d using R's base graphics
next_move_tidy

Determine the next position to move to and the turn out of there
rug_1d_grid

Rug plot in 1d using the grid package
na_omit_loon

Helper function to remove NAs for loon plots
points_2d_grid

Point plot in 2d using the grid package
rug_1d_loon

Rug plot in 1d using the interactive loon package
rect_2d_loon

Rectangle plot in 2d using the interactive loon package
label_2d_grid

Label plot in 2d using the grid package
rug_1d_graphics

Rug plot in 1d using R's base graphics
vport

Viewport Constructing Function for Grid Functions
label_2d_graphics

Label plot in 2d using R's base graphics
plot_exists

Check whether functions (plot*d to zenplot()) exist
plot_indices

Plot Indices of the Current Plot
wine

Wine Data Set
zenarrow

Defining an arrow
zenpath

Construct a Path of Indices to Order Variables
qq_2d_grid

Quantile-quantile plot in 2d using the grid package
unfold

Unfold the hypercube and produce all information concerning the zenpath and zenplot layout
zenplots

zenplots: Zigzag Expanded Navigation Plots
turn_checker

Check the Turns (Number/Type)
zenplot

Main function to create a zenplot
rect_1d_graphics

Rectangle plot in 1d using R's base graphics
axes_2d_grid

Axes arrow using the grid package
as_numeric

A list of columns
arrow_1d_loon

Arrow plot in 1d using the interactive loon package
arrow_1d_grid

Arrow plot in 1d using the grid package
arrow_2d_loon

Arrow plot in 2d using the interactive loon package
axes_2d_graphics

Axes arrows in 2d using R's base graphics
arrow_1d_graphics

Arrow plot in 1d using R's base graphics
adjust_bb

Auxiliary function for adjusting a bounding box
arrow_2d_graphics

Arrow plot in 2d using R's base graphics
arrow_2d_grid

Arrow plot in 2d using the grid package