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.line | Plots lines |
lpoints, panel.points | Plots points |
ltext, panel.text | Plots text |
lsegments, panel.segments | Plots line segments |
lpolygon, panel.polygons | Plots polygons |
larrows, panel.arrows | Plots arrows |
lrect, panel.rect | Plots rectangles |
panel.axis | Plots axes |
panel.superpose | Superimposes 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.