Package: gog 0.6.2

gog: Grammar of Graphics

Draw a plot by describing it. You name a table, a mark to draw, and which column goes to which part of the picture. This specification uses the same words in R, 'Python', 'Julia' and 'JavaScript', and one engine, written in 'Rust', draws it as an SVG in all four. On macOS and Windows the engine comes with the package. On Linux the install compiles it, which needs 'Rust' 1.75 or newer.

Authors:psychometrician [aut, cre]

gog_0.6.2.tar.gz
gog_0.6.2.zip(r-4.7-any)gog_0.6.2.zip(r-4.6-any)gog_0.6.2.zip(r-4.5-any)
gog_0.6.2.tgz(r-4.6-any)gog_0.6.2.tgz(r-4.5-any)
gog_0.6.2.tar.gz(r-4.7-any)gog_0.6.2.tar.gz(r-4.6-any)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
gog/json (API)

# Install 'gog' in R:
install.packages('gog', repos = c('https://psychometrician.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/psychometrician/gog/issues

On CRAN:

Conda:

data-visualizationgrammar-of-graphicsjavascriptjuliaplottingpythonrustsvgcargo

3.64 score 8 stars 7 scripts 79 exports 1 dependencies

Last updated from:2cc910f486 (on release). Checks:8 OK, 1 FAIL. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK268
source / vignettesOK305
linux-releaseOK253
macos-releaseOK349
macos-oldrelOK275
windows-develOK542
windows-releaseOK475
windows-oldrelOK507
wasm-releaseFAIL110

Exports:areabarbinboundsboxbrushcaptionclustercolorcolourconfidencecountcumulativedatadensitydeviationdodgeedgefacetflowglobegog_tablegroupintervaljitterlabellayoutlinemapmaxmeanmedianminnestnetworkopacityorderpalettepartitionpathpatternplaypointpolarproportionquantilequeryrangerender_svgrepelribbonrulesave_gifsave_jsonsave_pngsave_svgshapesizesmoothsmooth_bandspacestackstepstraightstraight_bandstylesubtitlesumsurfacetextthemetitlexx_labelyy_labelzz_labelzone

Dependencies:jsonlite

Readme and manuals

Help Manual

Help pageTopics
Join a transform to a mark with '*', making one layer.*.gog_atom *.gog_callable
Compose plot atoms with '+'.+.gog_spec
Bin a continuous variable into equal-width buckets (the histogram transform).bin
Draw low and high values you computed yourself.bounds
Box-and-whisker mark.box
Let the reader select rows, and dim the rest.brush
Set a caption, a line at the bottom of the plot.caption
Join the closest leaves, one pair at a time - the cluster tree.cluster
Map fill/stroke color to a column.color
The British spelling of 'color()', refused with direction.colour
The confidence interval of the mean in each group, for a mark that draws a low and a high value, such as 'interval' or 'ribbon'.confidence
The running total of a measure, along its axis.cumulative
Start a plot with a data frame.data
Estimate the smooth probability density of a continuous variable (a kernel density estimate).density
Spread band per group: the mean, plus and minus a number of standard deviations ('multiplier').deviation
Name the column that splits the plot into panels — small multiples.facet
Facet a plot into panel columns, or set a plot beside another./.gog_spec facet-operators |.gog_spec
Draw how an amount moves through a series of stages — the flow diagram.flow
View the sphere itself.globe
Read one of the example tables from gog's online manualgog_table
Split a layer into groups without coloring them.group
Move points that fall on the same place apart, along the categorical axis only.jitter
knitr print method for an arrangement.knit_print.gog_arrangement
knitr print method: the plot as SVG in an HTML page, and as a vector figure in a LaTeX pageknit_print.gog_spec
Draw a column's values as text labels — the 'text' mark's content.label
Place the nodes of a network, computed from a table of links.layout
Flatten the sphere onto the page.map
Marks - the shapes a plot drawsarea bar edge interval line marks path point ribbon rule step surface text zone
Pack the panel with nested regions.nest
The network space, where the nodes that 'layout()' places are drawn.network
Map opacity to a continuous column.opacity
Order the categorical axis by a column.order
Choose the colors that 'color()' uses.palette
Divide a whole among nested parts — one ring per level of a hierarchy.partition
Map texture to a categorical column - like 'shape', for fills and strokes.pattern
Cut the plot into frames and play them — the time dimension.play
Bend the plane into a circle.polar
The p-th quantile of 'y' per group.quantile
Plot a table from a databasequery
Quantile band per group, for marks that draw from a low value to a high one, such as 'interval' and 'ribbon'.range
Render a gog_spec to an SVG string.render_svg
Move overlapping labels apart until they can be read.repel
repr method: an arrangement as inline SVG in a Jupyter cell.repr_html.gog_arrangement
repr method: the plot as inline SVG in a Jupyter cell.repr_html.gog_spec
repr method: a one-line description of an arrangement.repr_text.gog_arrangement
repr method: a one-line description for the text/plain fallback.repr_text.gog_spec
Write a played plot to an animated GIF.save_gif
Save what the engine reads to draw a plot, as a JSON file.save_json
Save a plot as a PNG file.save_png
Save a plot as an SVG file.save_svg
Map a categorical column to the shape of each point.shape
Map a continuous column to the size of a point or of a text label.size
The band around a 'smooth' line: the fit's confidence band.smooth_band
View a 3-D plot from an angle.space
Resolving overlap - 'stack', 'dodge' and 'jitter'dodge stack
The band around a 'straight' line: the interval of the fitted line's mean.straight_band
Set constant visual properties on a layer.style
Set a subtitle, a second line under the title.subtitle
Set the parts of the plot that are not data: gridlines, background, frame, text size and legends.theme
Set the plot title.title
Transforms - statistics computed before the mark is drawncount max mean median min proportion smooth straight sum transforms
Bind the x-axis to a column.x
Set the name written on the x axis.x_label
Bind the y-axis to a column.y
Set the name written on the y axis.y_label
Bind the z-axis to a column.z
Set the name written on the z axis.z_label