Addresses a minor issue:
Issue: Despite setting the connectedScales
parameter
as “none”, every loon plot continued to share identical scales.
Cause: This was due to the connectedScales
parameter
not being passed into the function, leading to a failure in the logical
check.
Minor changes and additions
Added "loon.shiny"
to l_web()
now that
it appears as part of diveR package
Added arguments to l_hist()
for character vectors
and factors.
showFactors = FALSE
yshows = "density"
.Some minor changes in facets:
in facet_wrap, as the number of facet variables increase, the layout pattern is not consistent (e.g., one variable: the layout is by row; more than one variables: the layout is by column).
fix typos: “extent” –> “extend”
Removed the vignette “Example analysis” on the minority data to make room for a new vignette “Publishing loon plots”
New helper functions for changing grobs produced by loonGrob()
l_instantiateGrob
, l_setGrobPlotView
, and
l_updateGrob
Export some useful helper functions:
glyph_to_pch
: turn a loon point glyph to an R
graphics
plotting “character”.
get_display_color
: return the displayed
color.
as_hex6color
: return a 6 hexidecimal digit color
representations.
get_font_info_from_tk
: return font
information.
get_layer_states
: get layer states
get_model_display_order
: get the order of the
displayed elements, e.g., points in scatterplot and lines in
serialaxes.
tcl_img_2_r_raster
: turn a tk image object to an R
raster object.
char2num.data.frame
: a character data frame to a
numerical data frame.
A new function l_colorName
is exported which returns
the build-in color names based on the 12 or 6 hex code.
For loonGrob
, remove the lines at the base of the
tick marks
l_web()
now expanded to provide access to other
loon
related package documentation from the
great-northern-diver
github organization’s set of
repositories (in anticipation of putting diveR
on
CRAN)
Improved look of compound displays. (A lot of this is a result of
changes to loon.ggplot
package).
Includes
plotWidth
and plotHeight
to
l_facet()
and l_pairs()
l_getOption()
(e.g. bg = l_getOption("canvas_bg_guides")
)grobs
for facets. (as in
loonGrob()
)initial tk
window sizes are now larger
(500 x 500
instead of 200 x 200
)
A new vignette
“Logical queries in interactive graphics”
Explains how to use loon’s interactive plots and inspector to construct logical queries on the displayed data.
An enriched version of mtcars
is used for
illustration.
How a plot’s linkingKey
(from Loon’s linking model) can
be used to access the correct elements of any logical operation is also
described.
minor bug fixes and improvements
Three minor bug fixes on facets
If the by
is a formula with loon
n-dimensional states, no need to provide additional data, the formula
should be able to be converted to a data frame given by the states
info.
When by
has missing values, it is treated as other
n-dimensional states:
drop NAs, leave warnings (which one are removed)
Removed unnecessary warnings.
l_pairs()
has a progress bar for constructing,
linking, and connecting the scales of the plots.
there is now a new argument showProgressBar
that allows
this to be suppressed (e.g. in RMarkdown files)
for histograms of factors and character vectors: default setting
of arg showFactors
TRUE
whenever number of factor levels (or
equivalent unique strings) < 10TRUE
whenever < 25 to accomodate common factors
like month
or the 24 hours in a day.updated documentation on l_layer()
testing
As all examples are wrapped in if(interactive)
,
check all interactive examples to ensure they work well
hexadecimal colours seem to get slightly (generally ignorable)
different hexadecimal values for colours in tcltk
on
Solaris (see 1.3.3 comments). this caused problems in testing for exact
colours on Solaris.
Until this is sorted out, the testing for colour hex values in the
test suite were commented out to prevent loon from being unnecessarily
archived on CRAN. (The colours are correct, but our previous solution
generated warnings, which may cause problems for CRAN acceptance.)
Likely, in the future, we suppress the warning from
l_hexcolor()
when testing.
for iris dataset in tests, we drop an observation so that for each species, the number of observations are different.
an extremely minor update
test functions were changed to accommodate possibly inconsistent hex colours on Solaris OS.
For example, in Solaris only, the hex12 for the color “red” appears
both as “#FFFF00000000” and “#FF0000000000”. This can lead to failures
of testing equality on the hex12 strings (though both appeared by
creating the hex12 version of R’s “red” in TCL, as in
l_hexcolor("red")
)
Both hex 12 representations convert to hex 6 as “#FF0000”. That is,
hex12tohex6("#FFFF00000000")
and
hex12tohex6("#FF0000000000")
return "#FF0000"
except that the second also generates a warning.
also took the opportunity to
give more meaningful names to grobs when loonGrob()
is called on an l_compound
update the documentation summary l_plot_arguments
to
include arguments by
, on
, layout
,
and connectedScales
all of which are related to facetting
plots at creation.
wrap the examples in Bin_cut
with
if (interactive()) {}
Updated linking to once again be more natural
Problem: If a plot p1
say already
exists and participates in some linking group, say “mylinkingGroup”,
then creating a new plot in the same linking group via the command line
console (that is not using the inspector) then some decisions on syncing
the new plot’s linked states need to be made.
To this end, the new plot can make decisions via the argument
sync
as in
p2 <- l_plot(x, linkingGroup = "myLinkingGroup", sync = "pull", ...)
or
p2 <- l_plot(x, linkingGroup = "myLinkingGroup", sync = "push", ...)
If a value for sync
is not given, it will default to
sync = "pull"
, the idea being that the user intends to pull
all linkable state values because they indicated having p2
join the group at the time of its creation.
What has to be considered is what happens if, in the remaining
...
arguments, the user simultaneously includes values for
some of the linkable states such as color = "red"
.
The solution below tries to infer some of the intention of the user, when it can, and warn when it cannot.
Solution: Suppose that p1
exists as a
plot in linkingGroup = "myLinkingGroup"
and the user is now
creating a new plot, say p2
, with argument
linkingGroup = "myLinkingGroup"
given in the call to create
p2
.
If
the argument sync = "push"
is given in the call,
then
if any linkable states are explicitly given as part of the call:
if no linkable states are explicitly given as part of the call:
the argument is sync = "pull"
(either by default or
explicitly given to be "pull"
) and the
values are explicitly specified for some linkable states, then
For a loon
histogram, if the input is a list, the
histogram will be split into multiple panels. The x
of each
facet corresponds to an element in that list
A new feature has been added to
l_serialaxes(..., andrews = TRUE)
that will produce
Andrews’s Fourier functional curves for the data.
A new statistical layer l_layer_smooth
will generate
a smooth for the active points and add it as a layer
Minor bugs were fixed/improvements made such as
Added new functions l_loonWidgets() which returns widgets of all displayed loon plots. Related functions include
Fixed bug so that l_make_glyphs() again works in Mac OS Catalina (Thanks to Brian Ripley and Simon Urbanek)
A minor bug fix with respect to facet label layout
“color”, “size”, “linewidth”, “glyph”, added to ‘l_userOptions()’
loonGrob()
and grid.loon()
condGrob()
to effect the conditional construction
of either the desired grob (if it is visible in the loon plot) or the
empty grob as placeholder containing relevant argumentsplot.loon()
so that
plot(p)
of a loon plot p
will now draw the
corresponding grid object on the current deviceadded loonGrob()
and grid.loon()
functionality
l_compound
classes introduced to ease user creation
of complex layouts
loonGrob()
to any user-definedl_compound
model (e.g. l_pairs
, l_stl
)l_getPlots
which returns a list of the loon plots in
the display (works for simple loon plots too)l_getLocations
which returns a matrix showing the
location of the loon plots (in order) (works for simple loon plots
too)l_get_arrangeGrobArgs
which returns the arguments and
their values to be passed on to arrangeGrob() (from gridExtra) to allow
arbitrary layout by the user.
loonGrob_layoutType
which returns a string indicating
whether "location"
or "arrangeGrobArgs
” are to
be used when creating a grid version of the l_compound
.
(default is "locations"
, other possibility is
"arrangeGrobArgs"
Fixed widget handle class order: specific classes first.
l_hexcolor.R
l_plot_decomposed_ts
l_cget
and l_configure
are now a
generics with methods for objects of class loon
,
character
, and l_compound
.
New functions l_getOption
,
l_getOptionNames
, l_userOptions
,
l_userOptionDefault
, l_setOption
New function l_primitiveGlyphs
names
for loon object handles to print out the state
names. l_state_names
can be used alternatively
itemlabel
to itemLabel
showItemlabels
to showItemLabels
l_nestedTclList2Rlist
and
l_data
l_help
point to the official website.