CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes | Static Public Attributes
svgfig.Text Class Reference

Public Member Functions

def __init__
 
def __repr__
 
def SVG
 

Public Attributes

 attr
 
 d
 
 x
 
 y
 

Static Public Attributes

dictionary defaults = {"stroke":"none", "fill":"black", "font-size":5}
 

Detailed Description

Draws at text string at a specified point in local coordinates.

x, y                   required      location of the point in local coordinates
d                      required      text/Unicode string
attribute=value pairs  keyword list  SVG attributes 

Definition at line 1834 of file svgfig.py.

Constructor & Destructor Documentation

def svgfig.Text.__init__ (   self,
  x,
  y,
  d,
  attr 
)

Definition at line 1847 of file svgfig.py.

1848  def __init__(self, x, y, d, **attr):
1849  self.x = x
1850  self.y = y
1851  self.d = str(d)
1852  self.attr = dict(self.defaults)
1853  self.attr.update(attr)
def __init__
Definition: svgfig.py:1847
dictionary defaults
Definition: svgfig.py:1842

Member Function Documentation

def svgfig.Text.__repr__ (   self)

Definition at line 1844 of file svgfig.py.

References svgfig.SVG.attr, svgfig.Path.attr, svgfig.Curve.attr, svgfig.Poly.attr, svgfig.Text.attr, svgfig.Fig.d, svgfig.Plot.d, svgfig.Frame.d, svgfig.Path.d, svgfig.Poly.d, svgfig.Text.d, MuonGeometryArrange::MGACollection.x, svgfig.Plot.x, svgfig.Frame.x, svgfig.Text.x, MuonGeometryArrange::MGACollection.y, svgfig.Plot.y, svgfig.Frame.y, svgfig.Curve.Sample.y, and svgfig.Text.y.

1845  def __repr__(self):
1846  return "<Text %s at (%g, %g) %s>" % (repr(self.d), self.x, self.y, self.attr)
def __repr__
Definition: svgfig.py:1844
def svgfig.Text.SVG (   self,
  trans = None 
)
Apply the transformation "trans" and return an SVG object.

Definition at line 1854 of file svgfig.py.

References svgfig.SVG.attr, svgfig.Path.attr, svgfig.Curve.attr, svgfig.Poly.attr, svgfig.Text.attr, svgfig.Fig.d, svgfig.Plot.d, svgfig.Frame.d, svgfig.Path.d, svgfig.Poly.d, svgfig.Text.d, svgfig.totrans(), MuonGeometryArrange::MGACollection.x, svgfig.Plot.x, svgfig.Frame.x, svgfig.Text.x, MuonGeometryArrange::MGACollection.y, svgfig.Plot.y, svgfig.Frame.y, svgfig.Curve.Sample.y, and svgfig.Text.y.

1855  def SVG(self, trans=None):
1856  """Apply the transformation "trans" and return an SVG object."""
1857  if isinstance(trans, basestring): trans = totrans(trans)
1858 
1859  X, Y = self.x, self.y
1860  if trans != None: X, Y = trans(X, Y)
1861  return SVG("text", self.d, x=X, y=Y, **self.attr)
def totrans
Definition: svgfig.py:597

Member Data Documentation

svgfig.Text.attr

Definition at line 1851 of file svgfig.py.

Referenced by svgfig.Text.__repr__(), svgfig.TextGlobal.__repr__(), svgfig.Dots.__repr__(), svgfig.LineGlobal.__repr__(), svgfig.Ticks.__repr__(), svgfig.Axes.__repr__(), svgfig.HGrid.__repr__(), svgfig.VGrid.__repr__(), svgfig.Grid.__repr__(), svgfig.Text.SVG(), svgfig.TextGlobal.SVG(), svgfig.LineGlobal.SVG(), svgfig.Axes.SVG(), svgfig.XErrorBars.SVG(), and svgfig.YErrorBars.SVG().

svgfig.Text.d

Definition at line 1850 of file svgfig.py.

Referenced by svgfig.Text.__repr__(), svgfig.TextGlobal.__repr__(), svgfig.Dots.__repr__(), svgfig.XErrorBars.__repr__(), svgfig.YErrorBars.__repr__(), svgfig.Text.SVG(), svgfig.TextGlobal.SVG(), svgfig.Dots.SVG(), svgfig.XErrorBars.SVG(), and svgfig.YErrorBars.SVG().

dictionary svgfig.Text.defaults = {"stroke":"none", "fill":"black", "font-size":5}
static

Definition at line 1842 of file svgfig.py.

svgfig.Text.x

Definition at line 1848 of file svgfig.py.

Referenced by python.rootplot.utilities.Hist.__init_TGraph(), svgfig.Curve.Sample.__repr__(), svgfig.Text.__repr__(), svgfig.TextGlobal.__repr__(), svgfig.VLine.__repr__(), svgfig.Ellipse.__repr__(), python.rootplot.root2matplotlib.Hist._prepare_xaxis(), python.rootplot.root2matplotlib.Hist._prepare_yaxis(), Vispa.Gui.WidgetContainer.WidgetContainer.autosize(), Vispa.Gui.VispaWidget.VispaWidget.boundingRect(), python.rootplot.root2matplotlib.Hist2D.box(), python.rootplot.root2matplotlib.Hist2D.contour(), python.rootplot.root2matplotlib.Hist.errorbar(), python.rootplot.root2matplotlib.Hist.errorbarh(), geometryXMLparser.Alignable.pos(), Vispa.Gui.ConnectableWidget.ConnectableWidget.positionizeMenuWidget(), svgfig.Text.SVG(), svgfig.TextGlobal.SVG(), and python.rootplot.utilities.Hist.TGraph().

svgfig.Text.y

Definition at line 1849 of file svgfig.py.

Referenced by python.rootplot.utilities.Hist.__getitem__(), python.rootplot.utilities.Hist.__init_TGraph(), python.rootplot.utilities.Hist.__iter__(), svgfig.Text.__repr__(), svgfig.TextGlobal.__repr__(), svgfig.HLine.__repr__(), svgfig.Ellipse.__repr__(), python.rootplot.utilities.Hist.__setitem__(), Vispa.Gui.WidgetContainer.WidgetContainer.autosize(), python.rootplot.root2matplotlib.Hist.bar(), python.rootplot.root2matplotlib.Hist.barh(), Vispa.Gui.VispaWidget.VispaWidget.boundingRect(), python.rootplot.root2matplotlib.Hist2D.box(), python.rootplot.root2matplotlib.Hist2D.contour(), python.rootplot.utilities.Hist.divide_wilson(), python.rootplot.root2matplotlib.Hist.errorbar(), python.rootplot.root2matplotlib.Hist.errorbarh(), python.rootplot.root2matplotlib.Hist.hist(), python.rootplot.utilities.Hist.min(), geometryXMLparser.Alignable.pos(), Vispa.Gui.ConnectableWidget.ConnectableWidget.positionizeMenuWidget(), python.rootplot.utilities.Hist.scale(), svgfig.Text.SVG(), svgfig.TextGlobal.SVG(), python.rootplot.utilities.Hist.TGraph(), and python.rootplot.utilities.Hist.TH1F().