Skip to content

Commit 79053a7

Browse files
Preparing for 0.1.1 release
1 parent c42479e commit 79053a7

File tree

4 files changed

+41
-7
lines changed

4 files changed

+41
-7
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: ContourFunctions
22
Type: Package
33
Title: Create Contour Plots from Data or a Function
4-
Version: 0.1.0.9000
4+
Version: 0.1.1
55
Authors@R: person("Collin", "Erickson",
66
email = "[email protected]",
77
role = c("aut", "cre"))

NEWS.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
# cf 0.1.0.9000
1+
# cf 0.1.1
2+
3+
Added ggplot2 contour functions.
4+
5+
Added contour lines option.
6+
27

38
# cf 0.1.0
49

cran-comments.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
I submitted twice last week.
2-
I was asked to change the name from cf, so it is now called ContourFunctions
1+
I added new functions and new functionality.
2+
3+
The only reverse dependency is another package of mine.
34

45
## Test environments
5-
* local Windows 7 install, R 3.4.0
6-
* x86_64-pc-linux-gnu, R 3.3.2
7-
* ubuntu 12.04 (on travis-ci), R 3.3.3
6+
* local Windows 7 install, R 3.6.0
7+
* ubuntu 14.04 (on travis-ci), R 3.6.0
88
* win-builder (devel and release)
99

1010
## R CMD check results

vignettes/Introduction_to_the_cf_R_package.Rmd

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ knitr::opts_chunk$set(fig.width=6, fig.height=6)
1515

1616

1717
The ContourFunctions R package provides functions that make it easier to make contour plots. The function `cf` is a quick function that can take in grid data, a function, or any data, and give a contour plot showing the function or data.
18+
By default, plots are made using base graphics,
19+
but they can also be done using ggplot2.
1820

1921
## `cf_grid`
2022

@@ -158,3 +160,30 @@ for the given plot.
158160
cf_4dim(function(x) {x[1] + x[2]^2 + sin(2*pi*x[3])})
159161
```
160162

163+
## Making plots with ggplot2
164+
165+
All of the above plots used R base graphics.
166+
Similar functions for `cf`, `cf_func`, `cf_data`, and `cf_grid`
167+
that use ggplot2 are also available as
168+
`gcf`, `gcf_func`, `gcf_data`, and `gcf_grid`
169+
170+
```{r}
171+
f2 <- function(x) {exp(x[1]) * sin(2*pi*x[2])}
172+
gcf(f2)
173+
```
174+
175+
176+
## Adding contour lines to plots
177+
178+
By default, the contour plots are made using filled colors.
179+
To add lines on top of the color fill, use `with_lines=TRUE`.
180+
To make a contour plot with only lines, use `lines_only=TRUE`.
181+
182+
```{r}
183+
cf(f2, with_lines=TRUE)
184+
```
185+
186+
```{r}
187+
gcf(f2, lines_only=TRUE, bar=T)
188+
```
189+

0 commit comments

Comments
 (0)