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.VGrid Class Reference
Inheritance diagram for svgfig.VGrid:
svgfig.Ticks

Public Member Functions

def __init__
 
def __repr__
 
def SVG
 
- Public Member Functions inherited from svgfig.Ticks
def __init__
 
def __repr__
 
def compute_logminiticks
 
def compute_logticks
 
def compute_miniticks
 
def compute_ticks
 
def interpret
 
def orient_tickmark
 
def regular_miniticks
 
def SVG
 

Public Attributes

 attr
 
 last_miniticks
 
 mini_attr
 
 ymax
 
- Public Attributes inherited from svgfig.Ticks
 arrow_end
 
 arrow_start
 
 attr
 
 f
 
 high
 
 labels
 
 last_miniticks
 
 logbase
 
 low
 
 miniticks
 
 text_attr
 
 ticks
 

Static Public Attributes

dictionary defaults = {"stroke-width":"0.25pt", "stroke":"gray"}
 
dictionary mini_defaults = {"stroke-width":"0.25pt", "stroke":"lightgray", "stroke-dasharray":"1,1"}
 
- Static Public Attributes inherited from svgfig.Ticks
dictionary defaults = {"stroke-width":"0.25pt"}
 
float minitick_end = 0.75
 
float minitick_start = -0.75
 
int text_angle = 0
 
dictionary text_defaults = {"stroke":"none", "fill":"black", "font-size":5}
 
float text_start = 2.5
 
float tick_end = 1.5
 
float tick_start = -1.5
 

Detailed Description

Draws the vertical lines of a grid over a specified region
using the standard tick specification (see help(Ticks)) to place the
grid lines.

HGrid(ymin, ymax, low, high, ticks, miniticks, logbase, mini_attr, attribute=value)

ymin, ymax              required        the y range
low, high               required        the x range
ticks                   default=-10     request ticks according to the standard
                                        tick specification (see help(Ticks))
miniticks               default=False   request miniticks according to the
                                        standard minitick specification
logbase                 default=None    if a number, the axis is logarithmic
                                        with ticks at the given base (usually 10)
mini_attr               default={}      SVG attributes for the minitick-lines
                                        (if miniticks != False)
attribute=value pairs   keyword list    SVG attributes for the major tick lines

Definition at line 3172 of file svgfig.py.

Constructor & Destructor Documentation

def svgfig.VGrid.__init__ (   self,
  ymin,
  ymax,
  low,
  high,
  ticks = -10,
  miniticks = False,
  logbase = None,
  mini_attr = {},
  attr 
)

Definition at line 3197 of file svgfig.py.

3198  def __init__(self, ymin, ymax, low, high, ticks=-10, miniticks=False, logbase=None, mini_attr={}, **attr):
3199  self.ymin, self.ymax = ymin, ymax
3201  self.mini_attr = dict(self.mini_defaults)
3202  self.mini_attr.update(mini_attr)
3203 
3204  Ticks.__init__(self, None, low, high, ticks, miniticks, None, logbase)
3206  self.attr = dict(self.defaults)
3207  self.attr.update(attr)
dictionary mini_defaults
Definition: svgfig.py:3192
dictionary defaults
Definition: svgfig.py:2379
def __init__
Definition: svgfig.py:3197

Member Function Documentation

def svgfig.VGrid.__repr__ (   self)

Definition at line 3194 of file svgfig.py.

References svgfig.SVG.attr, svgfig.Path.attr, svgfig.Curve.attr, svgfig.Poly.attr, svgfig.Text.attr, svgfig.TextGlobal.attr, svgfig.Dots.attr, svgfig.Line.attr, svgfig.LineGlobal.attr, svgfig.VLine.attr, svgfig.HLine.attr, svgfig.Rect.attr, svgfig.Ellipse.attr, svgfig.Ticks.attr, svgfig.Curve.high, svgfig.Line.high, svgfig.Rect.high, svgfig.Ellipse.high, svgfig.Ticks.high, svgfig.Curve.low, svgfig.Line.low, svgfig.Rect.low, svgfig.Ellipse.low, svgfig.Ticks.low, svgfig.Ticks.miniticks, svgfig.Ticks.ticks, svgfig.Plot.ymax, svgfig.Frame.ymax, svgfig.Axes.ymax, svgfig.VGrid.ymax, fftjetcms::LookupTable2d.ymin(), Exhume::Event.ymin, cscdqm::AddressBox.ymin, AccretionCluster.ymin, and TrackerMap.ymin.

3195  def __repr__(self):
3196  return "<VGrid y=(%g, %g) %g <= x <= %g ticks=%s miniticks=%s %s>" % (self.ymin, self.ymax, self.low, self.high, str(self.ticks), str(self.miniticks), self.attr)
def __repr__
Definition: svgfig.py:3194
def svgfig.VGrid.SVG (   self,
  trans = None 
)
Apply the transformation "trans" and return an SVG object.

Definition at line 3208 of file svgfig.py.

3209  def SVG(self, trans=None):
3210  """Apply the transformation "trans" and return an SVG object."""
3211  self.last_ticks, self.last_miniticks = Ticks.interpret(self)
3212 
3213  ticksd = []
3214  for t in self.last_ticks.keys():
3215  ticksd += Line(t, self.ymin, t, self.ymax).Path(trans).d
3216 
3217  miniticksd = []
3218  for t in self.last_miniticks:
3219  miniticksd += Line(t, self.ymin, t, self.ymax).Path(trans).d
3220 
3221  return SVG("g", Path(d=ticksd, **self.attr).SVG(), Path(d=miniticksd, **self.mini_attr).SVG())

Member Data Documentation

svgfig.VGrid.attr

Definition at line 3205 of file svgfig.py.

Referenced by svgfig.XErrorBars.SVG(), and svgfig.YErrorBars.SVG().

dictionary svgfig.VGrid.defaults = {"stroke-width":"0.25pt", "stroke":"gray"}
static

Definition at line 3191 of file svgfig.py.

svgfig.VGrid.last_miniticks

Definition at line 3210 of file svgfig.py.

svgfig.VGrid.mini_attr

Definition at line 3200 of file svgfig.py.

dictionary svgfig.VGrid.mini_defaults = {"stroke-width":"0.25pt", "stroke":"lightgray", "stroke-dasharray":"1,1"}
static

Definition at line 3192 of file svgfig.py.

svgfig.VGrid.ymax

Definition at line 3198 of file svgfig.py.

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