The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
The plotannotate package allows annotating plots created
with ‘base R graphics’. The function for this purpose is called
annotate. After creating a plot, for example with
plot(), the command annotate() enters a
freehand drawing mode where one can draw on the plot with the mouse (or
some other input device). Various symbols (points, lines, arrows,
rectangles, circles, ellipses) and text can also be added. Pressing
q or the right mouse button terminates the annotation
mode.
The functionality provided by the package is especially useful when teaching (e.g., to visually explain certain plot elements), but can also be used for creating quick sketches.
Note that the annotate() function makes extensive use of
getGraphicsEvent to capture mouse movements and keyboard
inputs. Only some graphics devices support this (currently only
windows and x11). If you receive the error
message ‘The graphics device does not support event handling’, then the
graphics device that was opened does not provide this kind of
functionality. For example, this will be the case for the
RStudioGD graphics device that is used by RStudio or the
quartz graphics device that is used by default by macOS.
You can then try running x11() before creating the
plot.
Also, annotate() does not work for plots based on the
grid graphics engine (which includes plots created with the
ggplot2 or lattice packages), since such plots
are not compatible with getGraphicsEvent.
The plotannotate package is licensed under the GNU General Public
License Version 3. To report any issues or bugs, please go here.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.