-
-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
Description
This is part of a larger effort to collect what parameters do different backends take for markers. I was tasked with Ginga and chose to document my findings as GitHub issue. Luckily Ginga has a way for me to programmatically query such things, for example:
from ginga.canvas.types import basic
params = basic.TextP.get_params_metadata()
for p in params:
print(f"{p.name} | {p.default} | {p.description}")
I did not include canvas objects that don't look like they quality as "markers," e.g., Bezier Curve.
Point
Name | Default | Description |
---|---|---|
coord | data | Set type of coordinates |
x | 0.0 | X coordinate of center of object |
y | 0.0 | Y coordinate of center of object |
radius | 1.0 | Radius of object |
style | cross | Style of point (default 'cross') |
linewidth | 1 | Width of outline |
linestyle | solid | Style of outline (default solid) |
color | yellow | Color of outline |
alpha | 1.0 | Opacity of outline |
showcap | False | Show caps for this object |
Crosshair
Name | Default | Description |
---|---|---|
coord | data | Set type of coordinates |
x | 0.0 | X coordinate of center of object |
y | 0.0 | Y coordinate of center of object |
linewidth | 1 | Width of outline |
linestyle | solid | Style of outline (default solid) |
color | green | Color of outline |
alpha | 1.0 | Opacity of outline |
text | None | Text annotation |
textcolor | yellow | Color of text annotation |
font | Sans Serif | Font family for text |
fontsize | None | Font size of text (default: vary by scale) |
fontscale | True | Scale font with scale of viewer |
format | xy | Format for text annotation (default: xy) |
Box (rectangular)
Name | Default | Description |
---|---|---|
coord | data | Set type of coordinates |
x | 0.0 | X coordinate of center of object |
y | 0.0 | Y coordinate of center of object |
xradius | 1.0 | X radius of object |
yradius | 1.0 | Y radius of object |
linewidth | 1 | Width of outline |
linestyle | solid | Style of outline (default solid) |
color | yellow | Color of outline |
alpha | 1.0 | Opacity of outline |
fill | False | Fill the interior |
fillcolor | None | Color of fill |
fillalpha | 1.0 | Opacity of fill |
showcap | False | Show caps for this object |
rot_deg | 0.0 | Rotation about center of object |
SquareBox
Name | Default | Description |
---|---|---|
coord | data | Set type of coordinates |
x | 0.0 | X coordinate of center of object |
y | 0.0 | Y coordinate of center of object |
radius | 1.0 | radius of object |
linewidth | 1 | Width of outline |
linestyle | solid | Style of outline (default solid) |
color | yellow | Color of outline |
alpha | 1.0 | Opacity of outline |
fill | False | Fill the interior |
fillcolor | None | Color of fill |
fillalpha | 1.0 | Opacity of fill |
showcap | False | Show caps for this object |
rot_deg | 0.0 | Rotation about center of object |
Rectangle
The Square
class somehow is a direct subclass, so has these same parameters.
Name | Default | Description |
---|---|---|
coord | data | Set type of coordinates |
x1 | 0.0 | First X coordinate of object |
y1 | 0.0 | First Y coordinate of object |
x2 | 0.0 | Second X coordinate of object |
y2 | 0.0 | Second Y coordinate of object |
linewidth | 1 | Width of outline |
linestyle | solid | Style of outline (default solid) |
color | yellow | Color of outline |
alpha | 1.0 | Opacity of outline |
fill | False | Fill the interior |
fillcolor | None | Color of fill |
fillalpha | 1.0 | Opacity of fill |
drawdims | False | Annotate with dimensions of object |
font | Sans Serif | Font family for text |
showcap | False | Show caps for this object |
Triangle
Name | Default | Description |
---|---|---|
coord | data | Set type of coordinates |
x | 0.0 | X coordinate of center of object |
y | 0.0 | Y coordinate of center of object |
xradius | 1.0 | X radius of object |
yradius | 1.0 | Y radius of object |
linewidth | 1 | Width of outline |
linestyle | solid | Style of outline (default solid) |
color | yellow | Color of outline |
alpha | 1.0 | Opacity of outline |
fill | False | Fill the interior |
fillcolor | None | Color of fill |
fillalpha | 1.0 | Opacity of fill |
showcap | False | Show caps for this object |
rot_deg | 0.0 | Rotation about center of object |
RightTriangle
Name | Default | Description |
---|---|---|
coord | data | Set type of coordinates |
x1 | 0.0 | First X coordinate of object |
y1 | 0.0 | First Y coordinate of object |
x2 | 0.0 | Second X coordinate of object |
y2 | 0.0 | Second Y coordinate of object |
linewidth | 1 | Width of outline |
linestyle | solid | Style of outline (default solid) |
color | yellow | Color of outline |
alpha | 1.0 | Opacity of outline |
fill | False | Fill the interior |
fillcolor | None | Color of fill |
fillalpha | 1.0 | Opacity of fill |
showcap | False | Show caps for this object |
Circle
Name | Default | Description |
---|---|---|
coord | data | Set type of coordinates |
x | 0.0 | X coordinate of center of object |
y | 0.0 | Y coordinate of center of object |
radius | 1.0 | Radius of object |
linewidth | 1 | Width of outline |
linestyle | solid | Style of outline (default solid) |
color | yellow | Color of outline |
alpha | 1.0 | Opacity of outline |
fill | False | Fill the interior |
fillcolor | None | Color of fill |
fillalpha | 1.0 | Opacity of fill |
showcap | False | Show caps for this object |
Ellipse
Name | Default | Description |
---|---|---|
coord | data | Set type of coordinates |
x | 0.0 | X coordinate of center of object |
y | 0.0 | Y coordinate of center of object |
xradius | 1.0 | X radius of object |
yradius | 1.0 | Y radius of object |
linewidth | 1 | Width of outline |
linestyle | solid | Style of outline (default solid) |
color | yellow | Color of outline |
alpha | 1.0 | Opacity of outline |
fill | False | Fill the interior |
fillcolor | None | Color of fill |
fillalpha | 1.0 | Opacity of fill |
showcap | False | Show caps for this object |
rot_deg | 0.0 | Rotation about center of object |
Annulus
Name | Default | Description |
---|---|---|
coord | data | Set type of coordinates |
x | 0.0 | X coordinate of center of object |
y | 0.0 | Y coordinate of center of object |
radius | 1.0 | Inner radius of annulus |
width | None | Width of annulus |
atype | circle | Type of annulus |
linewidth | 1 | Width of outline |
linestyle | solid | Style of outline (default solid) |
color | yellow | Color of outline |
alpha | 1.0 | Opacity of outline |
Polygon
Name | Default | Description |
---|---|---|
coord | data | Set type of coordinates |
linewidth | 1 | Width of outline |
linestyle | solid | Style of outline (default solid) |
color | yellow | Color of outline |
alpha | 1.0 | Opacity of outline |
fill | False | Fill the interior |
fillcolor | None | Color of fill |
fillalpha | 1.0 | Opacity of fill |
showcap | False | Show caps for this object |
Line
Name | Default | Description |
---|---|---|
coord | data | Set type of coordinates |
x1 | 0.0 | First X coordinate of object |
y1 | 0.0 | First Y coordinate of object |
x2 | 0.0 | Second X coordinate of object |
y2 | 0.0 | Second Y coordinate of object |
linewidth | 1 | Width of outline |
linestyle | solid | Style of outline (default solid) |
arrow | none | Arrows at ends (default: none) |
color | yellow | Color of outline |
alpha | 1.0 | Opacity of outline |
showcap | False | Show caps for this object |
Text
Name | Default | Description |
---|---|---|
coord | data | Set type of coordinates |
x | 0.0 | X coordinate of lower left of text |
y | 0.0 | Y coordinate of lower left of text |
text | EDIT ME | Text to display |
font | Sans Serif | Font family for text |
fontsize | None | Font size of text (default: vary by scale) |
fontsize_min | 6.0 | Minimum font size of text (if not fixed) |
fontsize_max | None | Maximum font size of text (if not fixed) |
fontscale | False | Scale font with scale of viewer |
color | yellow | Color of text |
alpha | 1.0 | Opacity of text |
rot_deg | 0.0 | Rotation of text |
showcap | False | Show caps for this object |