From 2df85eb0fd328a4f876f2d6cb53c0aafdf38a899 Mon Sep 17 00:00:00 2001 From: t-bltg <13423344+t-bltg@users.noreply.github.com> Date: Mon, 2 Aug 2021 20:14:40 +0200 Subject: [PATCH] Update examples.jl --- src/examples.jl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/examples.jl b/src/examples.jl index 3915ce82..b40d577b 100644 --- a/src/examples.jl +++ b/src/examples.jl @@ -369,10 +369,12 @@ const _examples = PlotExample[ "Annotations", """ The `annotations` keyword is used for text annotations in data-coordinates. Pass in a - tuple `(x, y, text)`, or a vector of annotations, each of which is a tuple of `x`, `y` - and `text`. - `text` may be a simple `String`, or a `PlotText` object, which can be - built with the method `text(string, attrs...)`. + tuple `(x, y, text)`, a vector of annotations, each of which is a tuple of `x`, `y` + and `text`. You can position annotations using relative coordinates with the syntax + `((px, py), text)`, where for example `rx=.25` positions the annotation at `25%` of + the plot's width. + `text` may be a simple `String`, or a `PlotText` object, which can be built with the + method `text(string, attrs...)`. This wraps font and color attributes and allows you to set text styling. `text` may also be a tuple `(string, attrs...)` of arguments which are passed to `Plots.text`.