Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

bugfix: plot.border of theme_stata

  • Loading branch information...
commit ed6ccea3dcaeaa2cef78e378135772a32bde2903 1 parent 851c3fd
@jrnold authored
Showing with 16 additions and 13 deletions.
  1. +4 −1 R/stata.R
  2. +12 −12 README.md
View
5 R/stata.R
@@ -111,7 +111,7 @@ theme_stata_base <- function(base_size = 11, base_family = "") {
strip.text = element_text(size = rel(relsz['medlarge'])),
strip.text.x = element_text(vjust=0.5),
strip.text.y = element_text(angle = -90),
- plot.background = element_rect(),
+ plot.background = element_rect(linetype=0, colour=NA),
plot.title = element_text(size = rel(relsz['large']), hjust=0.5, vjust=1),
plot.margin = unit(rep(0.035, 4), "npc"),
complete=TRUE)
@@ -166,7 +166,10 @@ theme_stata_colors <- function(scheme="s2color") {
color_strip <- "black"
color_title <- "black"
color_border <- "black"
+ } else {
+ stop(sprintf("'%s' is not a valid value for scheme.", scheme))
}
+
theme(line = element_line(colour = color_fg, linetype=1),
rect = element_rect(fill = color_bg, colour = color_fg, linetype=1),
text = element_text(colour = color_fg),
View
24 README.md
@@ -59,7 +59,7 @@ Quantitative Information*.
theme_tufte())
```
-![plot of chunk unnamed-chunk-3](http://i.imgur.com/oNhqD.png)
+![plot of chunk unnamed-chunk-3](http://i.imgur.com/RyjWN.png)
The Tufte minimal boxplot.
@@ -70,7 +70,7 @@ The Tufte minimal boxplot.
geom_tufteboxplot())
```
-![plot of chunk unnamed-chunk-4](http://i.imgur.com/lDTLA.png)
+![plot of chunk unnamed-chunk-4](http://i.imgur.com/6Hh4x.png)
## Economist theme
@@ -84,7 +84,7 @@ magazine.
scale_colour_economist() + ggtitle("Diamonds Are Forever"))
```
-![plot of chunk unnamed-chunk-5](http://i.imgur.com/Ayhij.png)
+![plot of chunk unnamed-chunk-5](http://i.imgur.com/LlBTa.png)
## Solarized theme
@@ -99,7 +99,7 @@ The light theme.
scale_colour_solarized("blue"))
```
-![plot of chunk unnamed-chunk-6](http://i.imgur.com/vKKWR.png)
+![plot of chunk unnamed-chunk-6](http://i.imgur.com/5tIBx.png)
The dark theme.
@@ -110,7 +110,7 @@ The dark theme.
scale_colour_solarized("red"))
```
-![plot of chunk unnamed-chunk-7](http://i.imgur.com/DM33i.png)
+![plot of chunk unnamed-chunk-7](http://i.imgur.com/GFQ9r.png)
## Stata theme
@@ -124,7 +124,7 @@ schemes in Stata.
scale_colour_stata() + ggtitle("Plot Title"))
```
-![plot of chunk unnamed-chunk-8](http://i.imgur.com/iyYxH.png)
+![plot of chunk unnamed-chunk-8](http://i.imgur.com/qlFJl.png)
## Excel 2003 theme
@@ -138,7 +138,7 @@ and pies not included. Please never use this theme.
scale_colour_excel2003())
```
-![plot of chunk unnamed-chunk-9](http://i.imgur.com/ARsuO.png)
+![plot of chunk unnamed-chunk-9](http://i.imgur.com/7E3H0.png)
@@ -147,7 +147,7 @@ and pies not included. Please never use this theme.
theme_excel2003())
```
-![plot of chunk unnamed-chunk-10](http://i.imgur.com/ARBCq.png)
+![plot of chunk unnamed-chunk-10](http://i.imgur.com/O1fpa.png)
## Inverse Gray Theme
@@ -159,7 +159,7 @@ Inverse of `theme_gray`, i.e. white plot area and gray background.
(qplot(carat, price, data = dsamp, colour = cut) + theme_igray())
```
-![plot of chunk unnamed-chunk-11](http://i.imgur.com/m7Uth.png)
+![plot of chunk unnamed-chunk-11](http://i.imgur.com/wYjqA.png)
@@ -173,7 +173,7 @@ Color, fill, and shape scales based on those used in the Tableau softare.
scale_colour_tableau())
```
-![plot of chunk unnamed-chunk-12](http://i.imgur.com/USfHM.png)
+![plot of chunk unnamed-chunk-12](http://i.imgur.com/NnsLm.png)
@@ -182,7 +182,7 @@ Color, fill, and shape scales based on those used in the Tableau softare.
scale_colour_tableau("colorblind10"))
```
-![plot of chunk unnamed-chunk-13](http://i.imgur.com/S8wPQ.png)
+![plot of chunk unnamed-chunk-13](http://i.imgur.com/nmsgY.png)
## Stephen Few's Practical Rules for Using Color ...
@@ -195,6 +195,6 @@ Color palette and theme based on Stephen Few's ["Practical Rules for Using Color
scale_colour_few())
```
-![plot of chunk unnamed-chunk-14](http://i.imgur.com/hgT50.png)
+![plot of chunk unnamed-chunk-14](http://i.imgur.com/ku7B0.png)
Please sign in to comment.
Something went wrong with that request. Please try again.