Use this class to make a postscript drawing surface.
Use this to draw a line on the canvas.
coord | | default: [[0,0],[0,0]] | | Coordinates of the line. A list of [x,y] pairs. Can |
| | | | be as long as you like (not just two points). |
| | | | |
linecolor | | default: 'black' | | Color of the line. |
linewidth | | default: 1 | | Width of the line. |
linejoin | | default: 0 | | For turns in the line, how turn should be rounded. |
| | | | Options include 0->'miter', 1->'round', 2->'bevel' |
| | | | Default is miter |
linecap | | default: 0 | | Shape used at end of line (0->'butt', 1->'round', 2->'square') |
| | | | |
linedash | | default: 0 | | Dash pattern of the line. '0' means no dashes. |
| | | | Otherwise, a list describing the on/off pattern |
| | | | of the dashes, e.g., [2,2] means 2 on, 2 off, repeating. |
| | | | |
closepath | | default: False | | Can use this to close the path (and perhaps fill it). |
| | | | |
arrow | | default: False | | Turn an arrow at last segment on or off. |
arrowheadlength | | default: 4 | | Length of arrow head. |
arrowheadwidth | | default: 3 | | Width of arrow head. |
arrowlinecolor | | default: 'black' | | Color of arrow head line. |
arrowlinewidth | | default: 0.5 | | Width of line that makes arrow head. |
arrowfill | | default: True | | Fill arrow head with solid color? |
arrowfillcolor | | default: 'black' | | Color to fill arrow head with. |
arrowstyle | | default: 'normal' | | Style to use. 'normal' is one option. There are no others. |
| | | | |
Use this routine to place text on the canvas. Most options are obvious: the expected coordinate pair, color, text, font, size - the size of the font, rotation - which way the text should be rotated, but the anchor can be a bit confusing. Basically, the anchor determines where, relative to the coordinate pair (x,y), the text should be placed. Simple anchoring includes left (l), center (c), or right (r), which determines whether the text starts at the x position specified (left), ends at x (right), or is centered on the x (center). Adding a second anchor (xanchor,yanchor) specifies a y position anchoring as well. The three options there are low (l), which is the default if none is specified, high (h), and middle (m), again all determining the placement of the text relative to the y coordinate specified.
coord | | default: [0,0] | | Coordinates for text on the canvas. |
text | | default: 'text' | | Actual text to place on the canvas. |
font | | default: 'default' | | Typeface to use. |
color | | default: 'black' | | Color of letters. |
size | | default: 10 | | Font size. |
anchor | | default: 'c' | | Anchor: can either just specify left/right |
| | | | (e.g., 'c' for center, 'l' for left justify, 'r' for right) |
| | | | or can also specify vertical alignment (e.g., 'l,h' for left justify and high justify, |
| | | | 'r,c' for right and center, 'l,l' for left and low). |
| | | | |
rotate | | default: 0 | | Rotate text by this many degrees. |
bgcolor | | default: '' | | Background color behind text? Empty means no. |
| | | | |
bgborder | | default: 1 | | Border (black) around background color? |
Makes a box at coords specifying the bottom-left and upper-right corners. Can change the width of the surrounding line (linewidth=0 removes it). Can fill with solid or pattern. When filling with non-solid pattern, can add a background color so as not to be see-through.
coord | | default: [[0,0],[0,0]] | | Coordinates of box, from [x1,y1] to [x2,y2]. |
| | | | |
linecolor | | default: 'black' | | Color of lines that draws box. |
linewidth | | default: 1 | | Width of those lines. 0 means unlined box. |
| | | | |
linedash | | default: 0 | | Dash pattern in lines around box? |
linecap | | default: 0 | | How should corners be done? 0 is default; 1->'round', 2->'bevel'. |
| | | | |
fill | | default: False | | Should box be filled? If so, specify here. |
| | | | |
fillcolor | | default: 'black' | | Color of the fill pattern. |
fillstyle | | default: 'solid' | | Type of fill pattern. Right now, all are 'solid'. |
| | | | |
fillsize | | default: 3 | | Details of fill pattern includes size of each marker in pattern. |
| | | | |
fillskip | | default: 4 | | Also includes spacing between each marker in pattern. |
| | | | |
rotate | | default: 0 | | Rotate the box by this many degrees. |
bgcolor | | default: '' | | Put a background color behind the box. Useful when pattern has |
| | | | see-through parts in it. |
Can just make circles with this. Filled or not.
coord | | default: [0,0] | | Coordinates of center of circle in [x,y]. |
| | | | |
radius | | default: 1 | | Radius of circle. |
scale | | default: [1,1] | | Scale in x direction and y direction, to make |
| | | | an ellipse, for example. |
linecolor | | default: 'black' | | Color of lines of circle. |
linewidth | | default: 1 | | Width of lines of circle. |
linedash | | default: 0 | | Whether line is dashed or not. |
fill | | default: False | | Fill circle with colored pattern? |
fillcolor | | default: 'black' | | Which color? |
fillstyle | | default: 'solid' | | Which pattern? |
fillsize | | default: 3 | | Details of pattern: size of each marker. |
fillskip | | default: 4 | | Details of pattern: space between each marker. |
| | | | |
bgcolor | | default: '' | | Background color behind circle, useful if fill pattern |
| | | | has some holes in it. |
Use this method to make an arbitrary polygon, by passing in its coordinates. All the usual arguments are specified.
coord | | default: [] | | The list of [x,y] pairs that form the coordinates. |
| | | | |
linecolor | | default: 'black' | | The color of the surrounding line (if width > 0). |
| | | | |
linewidth | | default: 1 | | The width of the line (0 for no line). |
linecap | | default: 0 | | The linecap. |
linedash | | default: 0 | | The line dash pattern. |
fill | | default: False | | Fill the polygon? |
fillcolor | | default: 'black' | | What color to fill it? |
fillstyle | | default: 'solid' | | What style to fill it with? |
fillsize | | default: 3 | | The fill size... |
fillskip | | default: 4 | | ...and the skip. |
bgcolor | | default: '' | | A background color if there is no fill; useful |
| | | | behind a pattern. |