Public Member Functions | |
def | __init__ (self, d, kwds) |
def | __repr__ (self) |
def | SVG (self, trans=None) |
Public Attributes | |
d | |
trans | |
Stores graphics primitive objects and applies a single coordinate transformation to them. To compose coordinate systems, nest Fig objects. Fig(obj, obj, obj..., trans=function) obj optional list a list of drawing primatives trans default=None a coordinate transformation function >>> fig = Fig(Line(0,0,1,1), Rect(0.2,0.2,0.8,0.8), trans="2*x, 2*y") >>> print fig.SVG().xml() <g> <path d='M0 0L2 2' /> <path d='M0.4 0.4L1.6 0.4ZL1.6 1.6ZL0.4 1.6ZL0.4 0.4ZZ' /> </g> >>> print Fig(fig, trans="x/2., y/2.").SVG().xml() <g> <path d='M0 0L1 1' /> <path d='M0.2 0.2L0.8 0.2ZL0.8 0.8ZL0.2 0.8ZL0.2 0.2ZZ' /> </g>
def svgfig.Fig.__init__ | ( | self, | |
d, | |||
kwds | |||
) |
Definition at line 742 of file svgfig.py.
def svgfig.Fig.__repr__ | ( | self | ) |
Definition at line 734 of file svgfig.py.
Referenced by data_sources.json_file.__str__().
def svgfig.Fig.SVG | ( | self, | |
trans = None |
|||
) |
Apply the transformation "trans" and return an SVG object. Coordinate transformations in nested Figs will be composed.
Definition at line 752 of file svgfig.py.
References svgfig.Fig.d, svgfig.totrans(), and svgfig.Fig.trans.
svgfig.Fig.d |
Definition at line 743 of file svgfig.py.
Referenced by svgfig.Frame.__repr__(), svgfig.Path.__repr__(), svgfig.Poly.__repr__(), svgfig.Text.__repr__(), svgfig.TextGlobal.__repr__(), svgfig.Dots.__repr__(), svgfig.XErrorBars.__repr__(), svgfig.YErrorBars.__repr__(), svgfig.Poly.Path(), svgfig.Fig.SVG(), svgfig.Path.SVG(), svgfig.Text.SVG(), svgfig.TextGlobal.SVG(), svgfig.Dots.SVG(), svgfig.XErrorBars.SVG(), and svgfig.YErrorBars.SVG().
svgfig.Fig.trans |
Definition at line 735 of file svgfig.py.
Referenced by svgfig.Fig.SVG(), and svgfig.Plot.SVG().