Low-Level Functions

In Custom Panel Functions, we showed how to modify the appearance of a chart through custom panel functions. The lattice package includes a variety of different panel functions that you can use to customize your charts. You can start with one of the included panel functions, use another panel function, or even write your own.

Low-Level Graphics Functions

Here is a list of some primitive panel plotting functions available within the lattice package. These are functions that are useful for writing your own panel functions from scratch, though they can also be used in conjunction with higher-level functions. (For example, you can use panel.text along with panel.barchart to plot a bar chart with added text.)

Function(s)Description
llines, panel.linePlots lines
lpoints, panel.pointsPlots points
ltext, panel.textPlots text
lsegments, panel.segmentsPlots line segments
lpolygon, panel.polygonsPlots polygons
larrows, panel.arrowsPlots arrows
lrect, panel.rectPlots rectangles
panel.axisPlots axes
panel.superposeSuperimposes panel functions on top of the same plot (by grouping value)

For more information on how to use these functions, see the help file for any of these functions (such as llines).

Panel Functions

Here is a list of some functions for adding to, or customizing the appearance of, other panels. You can use these functions to add lines, text, and other graphical elements to lattice graphics. For an example of using panel functions to modify the appearance of a plot, see Custom ...

Get R in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.