Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plot_trajectoryB() might gain 'main_line' #205

Closed
maurolepore opened this issue Jun 2, 2021 · 1 comment · Fixed by #210
Closed

plot_trajectoryB() might gain 'main_line' #205

maurolepore opened this issue Jun 2, 2021 · 1 comment · Fixed by #210
Assignees

Comments

@maurolepore
Copy link
Contributor

maurolepore commented Jun 2, 2021

Follows from https://github.com/2DegreesInvesting/r2dii.plot/pull/201#issuecomment-853135147

The excercise of developing plot_trajectoryB() exposed that the
most important information we need users to provide is the
'main_line', e.g. 'main_line = "projected"'. This is considerably
simpler than passing an ordered vector.

With this in mind, I wonder if prot_trajectoryB() should gain
the 'main_line' argument (how about calling it 'projected' instead?
or anything a bit more specific than 'main'?).

If I understand correctly, that would allow us to do the ordering inside
plot_trajectoryB() -- eliminating the risk that the user will forget
to order metric.

@MonikaFu
Copy link
Collaborator

MonikaFu commented Jun 3, 2021

Yes, indeed - that is correct. I kind of like to keep the name generic - (as main_line) - to keep the plotting functions rather independent of the names functioning in the data plotted. I don't think that what the user wants to plot will always be called projected. The point here is that the 'main_line' is the trajectory line that should have the most visual importance.

maurolepore pushed a commit that referenced this issue Jun 6, 2021
* Refactor and new helper `abort_if_invalid_length()`
* Use backtics to format variables (reserve quotes for values).
* The error message now prints correctly -- starting with a bullet.
* `any()` is missleading, as `main_line` should have length-1 (?)
* New helper `abort_if_invalid_length()`
* Classify `abort_if_invalid_length()`
* Rename for consistency
* Reword argument description for consistency
* Rename for consistency
* Side-effect functions should return invisible()
* Rename for consistency
* Polish docs
maurolepore pushed a commit that referenced this issue Jun 6, 2021
Closes #205

In this PR I add a `main_line` argument to plot_trajectoryB()cso that the user does not have to reorder data with `factor()` to indicate which data should be the main line.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants