Easy Function Plot
Easy function plot w/o the need to define x, y
coordinates.
fplot(f, interval, ...) ezplot( f, a, b, n = 101, col = "blue", add = FALSE, lty = 1, lwd = 1, marker = 0, pch = 1, grid = TRUE, gridcol = "gray", fill = FALSE, fillcol = "lightgray", xlab = "x", ylab = "f (x)", main = "Function Plot", ...)
f |
Function to be plotted. |
interval |
interval [a, b] to plot the function in |
a, b |
Left and right endpoint for the plot. |
n |
Number of points to plot. |
col |
Color of the function graph. |
add |
logical; shall the polt be added to an existing plot. |
lty |
line type; default 1. |
lwd |
line width; default 1. |
marker |
no. of markers to be added to the curve; defailt: none. |
pch |
poimt character; default circle. |
grid |
Logical; shall a grid be plotted?; default |
gridcol |
Color of grid points. |
fill |
Logical; shall the area between function and axis be filled?;
default: |
fillcol |
Color of fill area. |
xlab |
Label on the |
ylab |
Label on the |
main |
Title of the plot |
... |
More parameters to be passed to |
Calculates the x, y
coordinates of points to be plotted and
calls the plot
function.
If fill
is TRUE
, also calls the polygon
function
with the x, y
coordinates in appropriate order.
If the no. of markers
is greater than 2, this number of markers
will be added to the curve, with equal distances measured along the curve.
Plots the function graph and invisibly returns NULL
.
fplot
is almost an alias for ezplot
as all ez...
will be replaced by MATLAB with function names f...
in 2017.
ezplot
should mimick the Matlab function of the same name, has
more functionality, misses the possibility to plot several functions.
## Not run: fun <- function(x) x * cos(0.1*exp(x)) * sin(0.1*pi*exp(x)) ezplot(fun, 0, 5, n = 1001, fill = TRUE) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.