Draw a rotation schematic
f.plot.rotation.RdRenders one rotation cycle of a monthly calendar (as built by
expand_rotation_calendar() and friends, or the full.res/
simul.values.full.input data of a run.socmo() result) as a
timeline: active crop, cover crop, tillage, organic amendment and
irrigation events on parallel tracks, with emoji crop icons. Used
both as a standalone diagnostic plot (one static image per rotation
cycle) and, via op.sliding.month, as the per-frame renderer behind
f.make.gif.rotation()'s animation.
Usage
f.plot.rotation(
df.rotation.i,
title = "Rotation",
subtitle = NULL,
baseline.soil = 0,
baseline.plantcover = 0.05,
baseline.covercrop = 0.13,
baseline.crop = 0.3,
baseline.tillage = 0.57,
baseline.eom = 0.72,
baseline.irrigation = 0.82,
baseline.res = -0.5,
op.carbon.input = FALSE,
op.rothc.res = FALSE,
op.rotation.cycle = 1,
op.full.crop.list = NULL,
op.sliding.month = 0
)Arguments
- df.rotation.i
Monthly calendar data frame (one row per month), expected to carry the columns produced by the
expand_*/run.socmo()pipeline (year,month,rotation.cycle,crop.id.be.socmo,Catégorie, tillage/irrigation/eom columns...).- title
Plot title.
- subtitle
Plot subtitle.
- baseline.soil, baseline.plantcover, baseline.covercrop, baseline.crop, baseline.tillage, baseline.eom, baseline.irrigation, baseline.res
Vertical placement (y-axis fraction) of each schematic track.
- op.carbon.input
If
TRUE, show carbon input amounts instead of the plain event schematic.- op.rothc.res
If
TRUE, overlay RothC results on the schematic.- op.rotation.cycle
Which
rotation.cyclevalue(s) to draw.- op.full.crop.list
Optional full list of crop names/categories (from
f.get.all.crops()) to keep a stable color/emoji mapping across plots – needed so successive animation frames don't re-assign colors.- op.sliding.month
Month offset applied to the selected rotation cycle window;
f.make.gif.rotation()sweeps this from0to the rotation length to animate the calendar scrolling through time.