mc_plot: Scatterplot within Minecraft

Description Usage Arguments Value See Also Examples

View source: R/mc_plot.R

Description

Make a scatterplot within Minecraft

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
mc_plot(
  lowerleft = miner::getPlayerPos() + c(0, 5, 5),
  x,
  y,
  xlab = "x",
  ylab = "y",
  group = NULL,
  width = 120,
  height = 120,
  dir = c("east", "west", "north", "south", "up", "down"),
  top = c("up", "north", "south", "east", "west", "down"),
  block_colors = list(gray = c(35, 8), white = c(35, 0), black = c(35, 15), colors =
    cbind(35, c(9, 14, 5)))
)

Arguments

lowerleft

Vector of length 3, specifying the position of the lower-left corner of the plot.

x

Vector of x values

y

Vector of y values

xlab

x-axis label

ylab

y-axis label

group

Vector of groups for coloring the points

width

Width of plot in blocks

height

Height of plot in blocks

dir

Direction the plot will go

top

Direction for the top of the plot

block_colors

A list of block IDs and styles to denote the colors to be used; needs to contain "gray", "white", "black", and "colors".

Value

Returns the input lowerleft.

See Also

mc_clearplot()

Examples

1
2
3
4
5
6
7
## Not run: 
v <- mc_plot(getPlayerPos()+c(0, 5, 5),
             x=iris$Sepal.Length, y=iris$Sepal.Width,
             group=iris$Species,
             xlab="Sepal.Length", ylab="Sepal.Width")

## End(Not run)

ropenscilabs/miner.extra documentation built on Dec. 20, 2020, 1:25 p.m.