R/CoordinatePlane.R

Defines functions CoordinatePlane

Documented in CoordinatePlane

#' Plots an empty coordinate (cartesian) plane with customizable limits for the X and Y axis
#' 
#' \code{CoordinatePlane} plots an empty coordinate (cartesian) plane with customizable limits for the X and Y axis.
#' @param x_min Lowest value for the X axis
#' @param x_max Highest value for the X axis
#' @param y_min Lowest value for the Y axis
#' @param y_max Highest value for the Y axis
#' @return None. It produces a plot of a coordinate plane with axes and grid
#' @examples 
#' x_min <- -5
#' x_max <- 5
#' y_min <- -5
#' y_max <- 5
#' CoordinatePlane(x_min, x_max, y_min, y_max)
#' @export
CoordinatePlane <-function(x_min, x_max, y_min, y_max){
  plot(NULL, xlim=c(x_min,x_max), ylim=c(y_min,y_max), xlab="X", ylab="Y", xaxs="i", yaxs="i")
  grid(x_max-x_min, y_max-y_min)
  return()
}

Try the LearnGeom package in your browser

Any scripts or data that you put into this service are public.

LearnGeom documentation built on July 14, 2020, 5:06 p.m.