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
svgfig.Plot Class Reference

Public Member Functions

def __init__
 
def __repr__
 
def SVG
 

Public Attributes

 arrows
 
 atx
 
 aty
 
 axis_attr
 
 d
 
 flipx
 
 flipy
 
 height
 
 last_window
 
 minusInfinity
 
 text_attr
 
 trans
 
 width
 
 x
 
 xlabels
 
 xlogbase
 
 xminiticks
 
 xticks
 
 y
 
 ylabels
 
 ylogbase
 
 ymax
 
 yminiticks
 
 yticks
 

Detailed Description

Acts like Fig, but draws a coordinate axis. You also need to supply plot ranges.

Plot(xmin, xmax, ymin, ymax, obj, obj, obj..., keyword options...)

xmin, xmax      required        minimum and maximum x values (in the objs' coordinates)
ymin, ymax      required        minimum and maximum y values (in the objs' coordinates)
obj             optional list   drawing primatives
keyword options keyword list    options defined below

The following are keyword options, with their default values:

trans           None          transformation function
x, y            5, 5          upper-left corner of the Plot in SVG coordinates
width, height   90, 90        width and height of the Plot in SVG coordinates
flipx, flipy    False, True   flip the sign of the coordinate axis
minusInfinity   -1000         if an axis is logarithmic and an object is plotted at 0 or
                              a negative value, -1000 will be used as a stand-in for NaN
atx, aty        0, 0          the place where the coordinate axes cross
xticks          -10           request ticks according to the standard tick specification
                              (see help(Ticks))
xminiticks      True          request miniticks according to the standard minitick
                              specification
xlabels         True          request tick labels according to the standard tick label
                              specification
xlogbase        None          if a number, the axis and transformation are logarithmic
                              with ticks at the given base (10 being the most common)
(same for y)
arrows          None          if a new identifier, create arrow markers and draw them
                              at the ends of the coordinate axes
text_attr       {}            a dictionary of attributes for label text
axis_attr       {}            a dictionary of attributes for the axis lines

Definition at line 782 of file svgfig.py.

Constructor & Destructor Documentation

def svgfig.Plot.__init__ (   self,
  xmin,
  xmax,
  ymin,
  ymax,
  d,
  kwds 
)

Definition at line 822 of file svgfig.py.

823  def __init__(self, xmin, xmax, ymin, ymax, *d, **kwds):
824  self.xmin, self.xmax, self.ymin, self.ymax = xmin, xmax, ymin, ymax
825  self.d = list(d)
826  defaults = {"trans":None, "x":5, "y":5, "width":90, "height":90, "flipx":False, "flipy":True, "minusInfinity":-1000, \
827  "atx":0, "xticks":-10, "xminiticks":True, "xlabels":True, "xlogbase":None, \
828  "aty":0, "yticks":-10, "yminiticks":True, "ylabels":True, "ylogbase":None, \
829  "arrows":None, "text_attr":{}, "axis_attr":{}}
830  defaults.update(kwds)
831  kwds = defaults
832 
833  self.trans = kwds["trans"]; del kwds["trans"]
834  self.x = kwds["x"]; del kwds["x"]
835  self.y = kwds["y"]; del kwds["y"]
836  self.width = kwds["width"]; del kwds["width"]
837  self.height = kwds["height"]; del kwds["height"]
838  self.flipx = kwds["flipx"]; del kwds["flipx"]
839  self.flipy = kwds["flipy"]; del kwds["flipy"]
840  self.minusInfinity = kwds["minusInfinity"]; del kwds["minusInfinity"]
841  self.atx = kwds["atx"]; del kwds["atx"]
842  self.xticks = kwds["xticks"]; del kwds["xticks"]
843  self.xminiticks = kwds["xminiticks"]; del kwds["xminiticks"]
844  self.xlabels = kwds["xlabels"]; del kwds["xlabels"]
845  self.xlogbase = kwds["xlogbase"]; del kwds["xlogbase"]
846  self.aty = kwds["aty"]; del kwds["aty"]
847  self.yticks = kwds["yticks"]; del kwds["yticks"]
848  self.yminiticks = kwds["yminiticks"]; del kwds["yminiticks"]
849  self.ylabels = kwds["ylabels"]; del kwds["ylabels"]
850  self.ylogbase = kwds["ylogbase"]; del kwds["ylogbase"]
851  self.arrows = kwds["arrows"]; del kwds["arrows"]
852  self.text_attr = kwds["text_attr"]; del kwds["text_attr"]
853  self.axis_attr = kwds["axis_attr"]; del kwds["axis_attr"]
854  if len(kwds) != 0:
855  raise TypeError, "Plot() got unexpected keyword arguments %s" % kwds.keys()
def __init__
Definition: svgfig.py:822
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run

Member Function Documentation

def svgfig.Plot.__repr__ (   self)

Definition at line 816 of file svgfig.py.

817  def __repr__(self):
818  if self.trans == None:
819  return "<Plot (%d items)>" % len(self.d)
820  else:
821  return "<Plot (%d items) %s>" % (len(self.d), self.trans.func_name)
def __repr__
Definition: svgfig.py:816
def svgfig.Plot.SVG (   self,
  trans = None 
)
Apply the transformation "trans" and return an SVG object.

Definition at line 856 of file svgfig.py.

References svgfig.totrans(), svgfig.Fig.trans, and svgfig.Plot.trans.

857  def SVG(self, trans=None):
858  """Apply the transformation "trans" and return an SVG object."""
859  if trans == None: trans = self.trans
860  if isinstance(trans, basestring): trans = totrans(trans)
862  self.last_window = window(self.xmin, self.xmax, self.ymin, self.ymax, x=self.x, y=self.y, width=self.width, height=self.height, \
863  xlogbase=self.xlogbase, ylogbase=self.ylogbase, minusInfinity=self.minusInfinity, flipx=self.flipx, flipy=self.flipy)
864 
865  d = [Axes(self.xmin, self.xmax, self.ymin, self.ymax, self.atx, self.aty, \
866  self.xticks, self.xminiticks, self.xlabels, self.xlogbase, \
867  self.yticks, self.yminiticks, self.ylabels, self.ylogbase, \
868  self.arrows, self.text_attr, **self.axis_attr)] \
869  + self.d
870 
871  return Fig(Fig(*d, **{"trans":trans})).SVG(self.last_window)
def window
Definition: svgfig.py:642
def totrans
Definition: svgfig.py:597
def SVG
Definition: svgfig.py:856

Member Data Documentation

svgfig.Plot.arrows

Definition at line 850 of file svgfig.py.

Referenced by svgfig.Axes.SVG().

svgfig.Plot.atx

Definition at line 840 of file svgfig.py.

Referenced by svgfig.YAxis.__repr__(), svgfig.Axes.__repr__(), and svgfig.Axes.SVG().

svgfig.Plot.aty

Definition at line 845 of file svgfig.py.

Referenced by svgfig.XAxis.__repr__(), svgfig.Axes.__repr__(), and svgfig.Axes.SVG().

svgfig.Plot.axis_attr

Definition at line 852 of file svgfig.py.

svgfig.Plot.d

Definition at line 824 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.Path.SVG(), svgfig.Text.SVG(), svgfig.TextGlobal.SVG(), svgfig.Dots.SVG(), svgfig.XErrorBars.SVG(), and svgfig.YErrorBars.SVG().

svgfig.Plot.flipx

Definition at line 837 of file svgfig.py.

svgfig.Plot.flipy

Definition at line 838 of file svgfig.py.

svgfig.Plot.height

Definition at line 836 of file svgfig.py.

Referenced by Vispa.Main.MainWindow.MainWindow._saveIni(), Vispa.Gui.VispaWidget.VispaWidget.autosize(), Vispa.Gui.VispaWidget.VispaWidget.boundingRect(), Vispa.Gui.ConnectableWidget.ConnectableWidget.centerSinglePortVertically(), Vispa.Gui.VispaWidget.VispaWidget.contentRect(), Vispa.Gui.VispaWidget.VispaWidget.defineArrowBackgroundShape(), Vispa.Gui.VispaWidget.VispaWidget.defineCircleBackgroundShape(), Vispa.Gui.VispaWidget.VispaWidget.defineRoundRectBackgroundShape(), Vispa.Gui.VispaWidget.VispaWidget.imageRectF(), Vispa.Gui.VispaWidget.VispaWidget.paint(), Vispa.Gui.VispaWidget.VispaWidget.setZoom(), svgfig.Dots.SVG(), and Vispa.Main.MainWindow.MainWindow.updateStartupScreenGeometry().

svgfig.Plot.last_window

Definition at line 861 of file svgfig.py.

svgfig.Plot.minusInfinity

Definition at line 839 of file svgfig.py.

svgfig.Plot.text_attr

Definition at line 851 of file svgfig.py.

Referenced by svgfig.Axes.SVG().

svgfig.Plot.trans

Definition at line 817 of file svgfig.py.

Referenced by svgfig.Plot.SVG().

svgfig.Plot.width

Definition at line 835 of file svgfig.py.

Referenced by python.rootplot.utilities.Hist.__init_TGraph(), Vispa.Main.MainWindow.MainWindow._saveIni(), Vispa.Gui.VispaWidget.VispaWidget.autosize(), python.rootplot.root2matplotlib.Hist.bar(), python.rootplot.root2matplotlib.Hist.barh(), Vispa.Gui.VispaWidget.VispaWidget.boundingRect(), Vispa.Gui.VispaWidget.VispaWidget.contentRect(), Vispa.Gui.VispaWidget.VispaWidget.defineArrowBackgroundShape(), Vispa.Gui.VispaWidget.VispaWidget.defineCircleBackgroundShape(), Vispa.Gui.VispaWidget.VispaWidget.defineRoundRectBackgroundShape(), Vispa.Gui.VispaWidget.VispaWidget.drawHeaderBackground(), Vispa.Gui.ConnectableWidget.ConnectableWidget.drawPortNames(), Vispa.Gui.VispaWidget.VispaWidget.imageRectF(), Vispa.Gui.ConnectableWidget.ConnectableWidget.positionizeMenuWidget(), Vispa.Views.PropertyView.PropertyView.resizeEvent(), Vispa.Views.PropertyView.PropertyView.sectionResized(), Vispa.Gui.VispaWidget.VispaWidget.setZoom(), svgfig.Dots.SVG(), and Vispa.Main.MainWindow.MainWindow.updateStartupScreenGeometry().

svgfig.Plot.x

Definition at line 833 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.Plot.xlabels

Definition at line 843 of file svgfig.py.

Referenced by svgfig.Axes.SVG().

svgfig.Plot.xlogbase

Definition at line 844 of file svgfig.py.

Referenced by svgfig.Axes.SVG().

svgfig.Plot.xminiticks

Definition at line 842 of file svgfig.py.

Referenced by svgfig.Axes.SVG().

svgfig.Plot.xticks

Definition at line 841 of file svgfig.py.

Referenced by svgfig.Axes.SVG().

svgfig.Plot.y

Definition at line 834 of file svgfig.py.

Referenced by python.rootplot.utilities.Hist.__getitem__(), python.rootplot.utilities.Hist.__init_TGraph(), python.rootplot.utilities.Hist.__iter__(), svgfig.Curve.Sample.__repr__(), 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().

svgfig.Plot.ylabels

Definition at line 848 of file svgfig.py.

Referenced by svgfig.Axes.SVG().

svgfig.Plot.ylogbase

Definition at line 849 of file svgfig.py.

Referenced by svgfig.Axes.SVG().

svgfig.Plot.ymax

Definition at line 823 of file svgfig.py.

Referenced by svgfig.YAxis.__repr__(), svgfig.Axes.__repr__(), svgfig.VGrid.__repr__(), svgfig.Grid.__repr__(), and svgfig.Axes.SVG().

svgfig.Plot.yminiticks

Definition at line 847 of file svgfig.py.

Referenced by svgfig.Axes.SVG().

svgfig.Plot.yticks

Definition at line 846 of file svgfig.py.

Referenced by svgfig.Axes.SVG().