https://github.com/ahasverus/rsphere
:package: Plot a 2D Shaded Sphere
https://github.com/ahasverus/rsphere
plot r sf shade sphere
Last synced: 3 months ago
JSON representation
:package: Plot a 2D Shaded Sphere
- Host: GitHub
- URL: https://github.com/ahasverus/rsphere
- Owner: ahasverus
- License: other
- Created: 2020-11-19T17:07:18.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-19T18:01:09.000Z (over 4 years ago)
- Last Synced: 2025-01-20T05:52:45.209Z (4 months ago)
- Topics: plot, r, sf, shade, sphere
- Language: R
- Homepage:
- Size: 87.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```# rsphere
[](https://github.com/ahasverus/rsphere/actions)
[](https://opensource.org/licenses/MIT)
[](https://www.tidyverse.org/lifecycle/#experimental)The goal of rsphere is to plot a 2D shaded sphere with a two-colours gradient.
## Installation
You can install the development version from [GitHub](https://github.com/ahasverus/rsphere) with:
``` r
# install.packages("remotes")
remotes::install_github("ahasverus/rsphere")
```## Usage
```{r}
plot(x = 0, y = 0, asp = 1, xlim = c(-1, 1), ylim = c(-1, 1), axes = FALSE, ann = FALSE)
rsphere::add_sphere()
``````{r}
plot(x = 0, y = 0, asp = 1, xlim = c(-1, 1), ylim = c(-1, 1), axes = FALSE, ann = FALSE)
rsphere::add_sphere(x1 = 0.5, y1 = -0.5, col = c("black", "red"))
```