circles


circles, an Octave code which draws one or more circles, while controlling the center locations, radii, colors, edge colors, and transparency, by Chad Greene.

circles(x,y,r) plots circle of radius r centered at points (x,y). Inputs x, y, and r may be any combination of scalar, vector, or 2D matrix, but dimensions of all nonscalar inputs must agree.

circles(...,'vertices',numberOfPoints) allows specification of how many points to use for the outline of each circle. Default value is 1000, but this may be increased to increase plotting resolution. Or you may specify a small number (e.g. 4 to plot a square, 5 to plot a pentagon.

circles(...,'rotation',degreesRotation) rotates the shape by a given degreesRotation, which can be a scalar or a matrix. This is useless for circles, but may be desired for polygons with a discernible number of corner points.

circles(...,'ColorProperty',ColorValue) allows declaration of 'facecolor' or 'facealpha' as (name,value) pairs. Try declaring any fill or patch property.

circles(...,'LineProperty',LineValue) allows declaration of 'edgecolor', 'linewidth', and similar properties.

h = circles(...) returns the handle h of the plotted object.

Licensing:

The computer code and data files made available on this web page are distributed under this license.

Languages:

circles is available in a MATLAB version and an Octave version.

Related Data and Programs:

circles_test

gridlines, an Octave code which gives the user more control over drawing gridlines on a graph than the builtin grid command.

triangle_svg, an Octave code which uses Scalable Vector Graphics (SVG) to plot a triangle and any number of points, to illustrate quadrature rules and sampling techniques.

Source Code:


Last modified on 02 July 2023.