Skip to content

Commit 182999c

Browse files
author
Lindsay Carr
committed
Merge pull request #297 from lindsaycarr/master
side can be specified for error_bar
2 parents 54aaf58 + 626820f commit 182999c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

R/error_bars.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ error_bar.gsplot <- function(object, x, y, y.high=0, y.low=0, x.high=0, x.low=0,
6060
y.error <- y[errorIndex]
6161
x.error <- x[errorIndex]
6262
object <- arrows(object, x0=x.error, y0=y.error, x1=x.error, y1=y.low.coord,
63-
length=epsilon, angle=90, ..., legend.name=legend.name)
63+
length=epsilon, angle=90, ..., side=side, legend.name=legend.name)
6464
}
6565

6666
if(!all(y.high == 0)){
@@ -70,7 +70,7 @@ error_bar.gsplot <- function(object, x, y, y.high=0, y.low=0, x.high=0, x.low=0,
7070
y.error <- y[errorIndex]
7171
x.error <- x[errorIndex]
7272
object <- arrows(object, x0=x.error, y0=y.error, x1=x.error, y1=y.high.coord, length=epsilon,
73-
angle=90, ..., legend.name=check_legend_name(legend.name, y.low))
73+
angle=90, ..., side=side, legend.name=check_legend_name(legend.name, y.low))
7474
}
7575

7676
if(!all(x.low == 0)){
@@ -80,7 +80,7 @@ error_bar.gsplot <- function(object, x, y, y.high=0, y.low=0, x.high=0, x.low=0,
8080
x.error <- x[errorIndex]
8181
y.error <- y[errorIndex]
8282
object <- arrows(object, x0=x.error, y0=y.error, x1=x.low.coord, y1=y.error, length=epsilon,
83-
angle=90, ..., legend.name=check_legend_name(legend.name, c(y.low, y.high)))
83+
angle=90, ..., side=side, legend.name=check_legend_name(legend.name, c(y.low, y.high)))
8484
}
8585

8686
if(!all(x.high == 0)){
@@ -90,7 +90,7 @@ error_bar.gsplot <- function(object, x, y, y.high=0, y.low=0, x.high=0, x.low=0,
9090
x.error <- x[errorIndex]
9191
y.error <- y[errorIndex]
9292
object <- arrows(object, x0=x.error, y0=y.error, x1=x.high.coord, y1=y.error, length=epsilon,
93-
angle=90, ..., legend.name=check_legend_name(legend.name, c(y.low, y.high, x.low)))
93+
angle=90, ..., side=side, legend.name=check_legend_name(legend.name, c(y.low, y.high, x.low)))
9494
}
9595

9696
return(object)

0 commit comments

Comments
 (0)