Skip to contents

autoplot() is the ggplot2-idiomatic entry point and returns the same ggplot object as plot(), so the result can be further customised with + ... layers.

When the horizon carries a base year, the milestones that are GIVEN rather than optimised are washed out and a rule is drawn at the last given year: milestones before the base year are history and enter no LP at all, so they are washed more heavily than the base year, which is solved on its own by solve_base_year(). The caption says which is which. A horizon with no base year is drawn unchanged.

A milestone that is solved on a calendar of its own – intervals$calendar, which setCalendar() writes with years = – is labelled with that calendar's name inside its interval. The column holds names, so the figure needs nothing but the horizon.

Usage

# S3 method for class 'horizon'
autoplot(object, ...)

Arguments

object

An object of class horizon.

...

Additional optional arguments: hjust (numeric) to adjust the horizontal position of the intervals, accepts values between 0 and 1.

Value

A ggplot object.