CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Static Public Attributes
svgfig.XAxis Class Reference
Inheritance diagram for svgfig.XAxis:
svgfig.LineAxis svgfig.Line svgfig.Ticks svgfig.Curve

Public Member Functions

def __init__ (self, xmin, xmax, aty=0, ticks=-10, miniticks=True, labels=True, logbase=None, arrow_start=None, arrow_end=None, exclude=None, text_attr={}, **attr)
 
def __repr__ (self)
 
def SVG (self, trans=None)
 
- Public Member Functions inherited from svgfig.LineAxis
def __init__ (self, x1, y1, x2, y2, start=0., end=1., ticks=-10, miniticks=True, labels=True, logbase=None, arrow_start=None, arrow_end=None, exclude=None, text_attr={}, **attr)
 
def interpret (self)
 
- Public Member Functions inherited from svgfig.Line
def __init__ (self, x1, y1, x2, y2, arrow_start=None, arrow_end=None, **attr)
 
def Path (self, trans=None, local=False)
 
- Public Member Functions inherited from svgfig.Curve
def __init__ (self, f, low, high, loop=False, **attr)
 
def sample (self, trans=None)
 end nested class More...
 
def subsample (self, left, right, depth, 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 compute_logminiticks (self, base)
 
def compute_logticks (self, base, N, format)
 
def compute_miniticks (self, original_ticks)
 
def compute_ticks (self, N, format)
 
def orient_tickmark (self, t, trans=None)
 
def regular_miniticks (self, N)
 

Public Attributes

 aty
 
 y1
 
 y2
 
- Public Attributes inherited from svgfig.LineAxis
 end
 
 exclude
 
 f
 
 high
 
 low
 
 start
 
- Public Attributes inherited from svgfig.Line
 arrow_end
 
 attr
 
 f
 
 high
 
 loop
 
 low
 
 y2
 
- Public Attributes inherited from svgfig.Curve
 attr
 
 f
 
 high
 
 last_samples
 
 loop
 
 low
 
- 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"}
 
int text_angle = 0.
 
dictionary text_defaults = {"stroke":"none", "fill":"black", "font-size":5, "dominant-baseline":"text-before-edge"}
 
int text_start = -1.
 
- Static Public Attributes inherited from svgfig.LineAxis
dictionary defaults = {"stroke-width":"0.25pt"}
 
dictionary text_defaults = {"stroke":"none", "fill":"black", "font-size":5}
 
- Static Public Attributes inherited from svgfig.Line
dictionary defaults = {}
 
- Static Public Attributes inherited from svgfig.Curve
dictionary defaults = {}
 
int discontinuity_limit = 5.
 
float linearity_limit = 0.05
 
bool random_sampling = True
 
int recursion_limit = 15
 
- 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 an x axis with tick marks.

XAxis(xmin, xmax, aty, ticks, miniticks, labels, logbase, arrow_start, arrow_end,
exclude, text_attr, attribute=value)

xmin, xmax              required        the x range
aty                     default=0       y position to draw the axis
ticks                   default=-10     request ticks according to the standard
                                        tick specification (see help(Ticks))
miniticks               default=True    request miniticks according to the
                                        standard minitick specification
labels                  True            request tick labels according to the
                                        standard tick label specification
logbase                 default=None    if a number, the x axis is logarithmic
                                        with ticks at the given base (usually 10)
arrow_start             default=None    if a new string identifier, draw an arrow
                                        at the low-end of the axis, referenced by
                                        that identifier; if an SVG marker object,
                                        use that marker
arrow_end               default=None    if a new string identifier, draw an arrow
                                        at the high-end of the axis, referenced by
                                        that identifier; if an SVG marker object,
                                        use that marker
exclude                 default=None    if a (low, high) pair, don't draw text
                                        labels within this range
text_attr               default={}      SVG attributes for the text labels
attribute=value pairs   keyword list    SVG attributes for all lines

The exclude option is provided for Axes to keep text from overlapping
where the axes cross. Normal users are not likely to need it.

Definition at line 2937 of file svgfig.py.

Constructor & Destructor Documentation

◆ __init__()

def svgfig.XAxis.__init__ (   self,
  xmin,
  xmax,
  aty = 0,
  ticks = -10,
  miniticks = True,
  labels = True,
  logbase = None,
  arrow_start = None,
  arrow_end = None,
  exclude = None,
  text_attr = {},
**  attr 
)

Definition at line 2977 of file svgfig.py.

2977  def __init__(self, xmin, xmax, aty=0, ticks=-10, miniticks=True, labels=True, logbase=None, arrow_start=None, arrow_end=None, exclude=None, text_attr={}, **attr):
2978  self.aty = aty
2979  tattr = dict(self.text_defaults)
2980  tattr.update(text_attr)
2981  LineAxis.__init__(self, xmin, aty, xmax, aty, xmin, xmax, ticks, miniticks, labels, logbase, arrow_start, arrow_end, exclude, tattr, **attr)
2982 

Member Function Documentation

◆ __repr__()

def svgfig.XAxis.__repr__ (   self)

Reimplemented from svgfig.LineAxis.

Definition at line 2974 of file svgfig.py.

2974  def __repr__(self):
2975  return "<XAxis (%g, %g) at y=%g ticks=%s labels=%s %s>" % (self.xmin, self.xmax, self.aty, str(self.ticks), str(self.labels), self.attr)
2976 

References svgfig.SVG.attr, svgfig.Path.attr, svgfig.Curve.attr, svgfig.Plot.aty, svgfig.XAxis.aty, svgfig.Ticks.labels, str, svgfig.Ticks.ticks, fftjetcms::LookupTable2d.xmax(), TriggerDQMBase::MEbinning.xmax, AbsHcalFunctor.xmax(), MEbinning.xmax, MEPSet.xmax, HcalLinearCompositionFunctor.xmax(), HcalChebyshevFunctor.xmax(), HcalCubicInterpolator.xmax(), HcalInterpolatedTableFunctor.xmax(), HcalPolynomialFunctor.xmax(), ClusterizingHistogram.xmax, HcalPiecewiseLinearFunctor.xmax(), SummationStep.xmax, MuonBremsstrahlungSimulator.xmax, GammaFunctionGenerator.xmax, BaseNumericalRandomGenerator.xmax, fftjetcms::LinInterpolatedTable1D.xmax(), dqmoffline::l1t::HistDefinition.xmax, cscdqm::AddressBox.xmax, HLTObjectsMonitor::MEbinning.xmax, TrackerMap.xmax, svgfig.Axes.xmax, svgfig.HGrid.xmax, svgfig.Grid.xmax, fftjetcms::LookupTable2d.xmin(), TriggerDQMBase::MEbinning.xmin, AbsHcalFunctor.xmin(), MEbinning.xmin, PixelClusterizerBase::AccretionCluster.xmin, HcalLinearCompositionFunctor.xmin(), MEPSet.xmin, HcalChebyshevFunctor.xmin(), HcalCubicInterpolator.xmin(), HcalInterpolatedTableFunctor.xmin(), HcalPolynomialFunctor.xmin(), BremsstrahlungSimulator.xmin, ClusterizingHistogram.xmin, HcalPiecewiseLinearFunctor.xmin(), MTDClusterizerBase::AccretionCluster.xmin, SummationStep.xmin, MuonBremsstrahlungSimulator.xmin, GammaFunctionGenerator.xmin, BaseNumericalRandomGenerator.xmin, fftjetcms::LinInterpolatedTable1D.xmin(), dqmoffline::l1t::HistDefinition.xmin, cscdqm::AddressBox.xmin, HLTObjectsMonitor::MEbinning.xmin, and TrackerMap.xmin.

Referenced by data_sources.json_file.__str__().

◆ SVG()

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

Reimplemented from svgfig.LineAxis.

Definition at line 2983 of file svgfig.py.

2983  def SVG(self, trans=None):
2984  """Apply the transformation "trans" and return an SVG object."""
2985  self.y1 = self.aty
2986  self.y2 = self.aty
2987  return LineAxis.SVG(self, trans)
2988 

Member Data Documentation

◆ aty

svgfig.XAxis.aty

Definition at line 2978 of file svgfig.py.

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

◆ defaults

dictionary svgfig.XAxis.defaults = {"stroke-width":"0.25pt"}
static

Definition at line 2969 of file svgfig.py.

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

◆ text_angle

int svgfig.XAxis.text_angle = 0.
static

Definition at line 2972 of file svgfig.py.

◆ text_defaults

dictionary svgfig.XAxis.text_defaults = {"stroke":"none", "fill":"black", "font-size":5, "dominant-baseline":"text-before-edge"}
static

Definition at line 2970 of file svgfig.py.

◆ text_start

int svgfig.XAxis.text_start = -1.
static

Definition at line 2971 of file svgfig.py.

◆ y1

svgfig.XAxis.y1

◆ y2

svgfig.XAxis.y2

Definition at line 2986 of file svgfig.py.

str
#define str(s)
Definition: TestProcessor.cc:52