-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Automatically order ribbon plots by xvar * Allow interval plots (ribbons, pointrange, etc) to have a missing yvar * NEWS and version bump * Add ribbon tests
- Loading branch information
1 parent
2a46cb6
commit 7baaae2
Showing
6 changed files
with
179 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
source("helpers.R") | ||
using("tinysnapshot") | ||
|
||
mod = lm(mpg ~ wt, mtcars) | ||
pred = predict(mod, interval = "confidence") | ||
|
||
mtcars2 = cbind(mtcars, pred) | ||
|
||
|
||
f = function() { | ||
with( | ||
mtcars2, | ||
plot2( | ||
x = wt, y = fit, | ||
ymin = lwr, ymax = upr, | ||
type = "ribbon" | ||
) | ||
) | ||
} | ||
expect_snapshot_plot(f, label = "ribbon") | ||
|
||
f = function() { | ||
with( | ||
mtcars2, | ||
plot2( | ||
x = wt, | ||
ymin = lwr, ymax = upr, | ||
type = "ribbon" | ||
) | ||
) | ||
} | ||
expect_snapshot_plot(f, label = "ribbon_no_y") |