Allow to add vertical lines for developmental stages

Open
#149 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
r

Research direction

Start from the plot method used on the object returned by get_sim (the call plot(sim)[[1]] in the issue). Trace how facets are built and why geom_vline with dev_stages data adds extra facet panels. Adjust mapping or scales so vertical lines share the existing time plots. Confirm by reproducing the four-stage example from the issue body.

Written by the indexing model from the issue text.

Description

enhancement

Description

After a call to get_sim and to get_dev_stages for four stages, I plot the sim as curves through time (plot(sim)) followed by custom code to add four dev stages as vertical lines on the same plots:

sim <- get(sim(workspace, usm)
dev_stages <- get_dev_stages(sim, c("iamfs","ilaxs","idrps","inous"), usm)
p <- plot(sim)[[1]] + geom_vline(data=dev_stages[[usm]], aes(xintercept=Date, linetype=var)) +
      scale_linetype_manual(values = c("dotted","longdash","dashed","dotdash"))
print(p)

However, this adds four extra "facet" plots, one per dev stages.

Expected change

I would like a code as above (or similar) so that the dev stages appear as vertical lines on the same plots as plot(sim), not on extra facet plots.

Dominant language
R
Stars
1
Forks
3
Avg merge
9h 41m
Merged PRs (30d)
2

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SticsRPacks/CroPlotR

All issues in SticsRPacks/CroPlotR

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.