The new command plottools,polygonbyname draws shapes in plots. It knows about many mathematical shapes and has many options for creating them exactly as desired. This command is very useful for annotating other plots or building more complex 2-D visualizations. For example, it is used by GraphTheory,DrawGraph to render custom vertex shapes in Graph visualizations.
>
|
|
The size of shapes is primarily controlled by defining the dimensions of a box that should fit entirely inside the shape. Here is a parallelogram that fits a 16x9 box.
>
|
|
Regular polygons with an arbitrary number of sides can be specified by just a number for the name, or as "n-gon", or common name like "hexagon". Here is an animation of calling polygonbyname on the integers 3-36.
>
|
|
In addition to being able to specify the size of the polygon, you can specify its position with the center option and its orientation with the rotation option.
>
|
|
There many other ways to modify the shape with command options: irregular, reuleaux, rounded, star, and wide. Not all options, or combinations of options, are supported for every shape. See the help page for details.
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
Most of these command options can also be specified as part of the name. Here is a wide irregular 9 pointed star.
>
|
|
Many shapes commonly used in diagrams are known by name.
>
|
|