CMS 3D CMS Logo

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__ (self, ymin, ymax, low, high, ticks=-10, miniticks=False, logbase=None, mini_attr={}, attr)
 
def __repr__ (self)
 
def SVG (self, trans=None)
 
- Public Member Functions inherited from svgfig.Ticks
def __init__ (self, f, low, high, ticks=-10, miniticks=True, labels=True, logbase=None, arrow_start=None, arrow_end=None, text_attr={}, attr)
 
def __repr__ (self)
 
def compute_logminiticks (self, base)
 
def compute_logticks (self, base, N, format)
 
def compute_miniticks (self, original_ticks)
 
def compute_ticks (self, N, format)
 
def interpret (self)
 
def orient_tickmark (self, t, trans=None)
 
def regular_miniticks (self, N)
 
def SVG (self, trans=None)
 

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 3171 of file svgfig.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 3196 of file svgfig.py.

3196  def __init__(self, ymin, ymax, low, high, ticks=-10, miniticks=False, logbase=None, mini_attr={}, **attr):
3197  self.ymin, self.ymax = ymin, ymax
3198 
3199  self.mini_attr = dict(self.mini_defaults)
3200  self.mini_attr.update(mini_attr)
3201 
3202  Ticks.__init__(self, None, low, high, ticks, miniticks, None, logbase)
3203 
3204  self.attr = dict(self.defaults)
3205  self.attr.update(attr)
3206 
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)
#define update(a, b)

Member Function Documentation

◆ __repr__()

def svgfig.VGrid.__repr__ (   self)

◆ SVG()

def svgfig.VGrid.SVG (   self,
  trans = None 
)
Apply the transformation "trans" and return an SVG object.

Definition at line 3207 of file svgfig.py.

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

Member Data Documentation

◆ attr

svgfig.VGrid.attr

Definition at line 3204 of file svgfig.py.

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

◆ defaults

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

Definition at line 3190 of file svgfig.py.

Referenced by tree.Tree.reset(), and tree.Tree.var().

◆ last_miniticks

svgfig.VGrid.last_miniticks

Definition at line 3209 of file svgfig.py.

◆ mini_attr

svgfig.VGrid.mini_attr

Definition at line 3199 of file svgfig.py.

◆ mini_defaults

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

Definition at line 3191 of file svgfig.py.

◆ ymax

svgfig.VGrid.ymax

Definition at line 3197 of file svgfig.py.

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