
Package index
-
layer_before_stat()layer_after_stat()layer_before_geom()layer_after_scale()layer_is() - Inspect snapshots of sub-layer data
Workflow functions
These high-level functions take a ggplot object and a function or ggproto method, allowing interactions with the ggplot’s build pipeline as it is evaluated. Functions grouped into three “workflows”: Inspect, Capture, and Highjack.
-
with_ggtrace() - Generic workflow function which localizes a ggtrace call to a single ggplot object
-
ggtrace_inspect_n()inspect_n() - Inspect how many times a method was called
-
ggtrace_inspect_which()inspect_which() - Inspect which calls to a ggproto method met a particular condition
-
ggtrace_inspect_vars()inspect_vars() - Inspect the value of variables from a method
-
ggtrace_inspect_args()inspect_args() - Inspect the arguments passed into a method
-
ggtrace_inspect_return()inspect_return() - Inspect the return value of a method
-
ggtrace_inspect_on_error()inspect_on_error() - Get information about a ggproto method on error
-
ggtrace_capture_fn()capture_fn() - Capture a snapshot of a method as a pre-filled function
-
ggtrace_capture_env()capture_env() - Capture a snapshot of a method's execution environment
Highjack workflow
Manipulate a method’s behavior as it runs and return the modified graphical output
-
ggtrace_highjack_args()highjack_args() - Highjack a method's execution and modify its argument values
-
ggtrace_highjack_return()highjack_return() - Highjack a method's execution and make it return a user-supplied value
Contextualize errors at the layer and sub-layer level
Return information about the (sub-)layer ggproto method that errors while rendering
-
last_layer_errorcontext()last_sublayer_errorcontext() - Get the internal context of the last (sub-)layer error
Extending base::trace()
The low-level function ggtrace() extends base::trace() by managing the state of injected expressions (traces), which allows for contiguity across multiple traces and the inspection of evaluated expressions logged to the tracedump, via last_ggtrace() and global_ggtrace(). Unlike the high-level workflow functions, ggtrace() relies on the “side effect” of functions and methods being traced, which can be restored with gguntrace().
-
ggtrace() - Insert traces for delayed evaluation
-
ggedit() - Interactively edit a masking copy of the source code
-
gguntrace() - Remove any existing traces
-
last_ggtrace()set_last_ggtrace()clear_last_ggtrace() - Retrieve the last tracedump created by
ggtrace()
-
global_ggtrace()set_global_ggtrace()clear_global_ggtrace()global_ggtrace_state()global_ggtrace_on()global_ggtrace_off() - Retrieve all tracedumps created by
ggtrace()
-
get_method()get_method_inheritance()ggbody()ggformals() - Get information about ggproto methods
-
is_traced() - Check if a method is being traced
-
ggdebug()ggdebugonce()ggundebug() - Debug a ggproto method