powered by
contour provides a graphical representations of min-sum objective function, which is the weighted sum of the distances to demand points (distsum).
contour
distsum
# S3 method for loca.p contour( x, lp = numeric(0), xmin = min(min(x@x), xleft), xmax = max(max(x@x), xright), ymin = min(min(x@y), ybottom), ymax = max(max(x@y), ytop), n = 100, img = NULL, xleft = min(x@x), ybottom = min(x@y), xright = max(x@x), ytop = max(x@y), ... )
contour.loca.p plots a contour plot of min-sum function (distsum).
contour.loca.p
The loca.p object to compute the objective.
If given, then \(l_p\) norm will be used instead of the Euclidean norm.
The minimum value for x axis.
The maximum value for x axis.
The minimum value for y axis.
The maximum value for y axis.
The number of divisions for grid.
A raster image to plot on background.
The left position of the image.
The bottom position of the image.
The right position of the image.
The top position of the image.
Other options.
If \(p<1\) then \(l_p\) is not a norm, so only \(p>=1\) are valid values.
See also orloca-package, plot.loca.p and loca.p.
orloca-package
plot.loca.p
loca.p
# A new unweighted loca.p object loca <- loca.p(x = c(-1, 1, 1, -1), y = c(-1, -1, 1, 1)) # The contour plot of min-sum function for loca (a loca.p object) contour(loca)
Run the code above in your browser using DataLab