CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes | Static Public Attributes
svgfig.YAxis Class Reference
Inheritance diagram for svgfig.YAxis:
svgfig.LineAxis svgfig.Line svgfig.Ticks svgfig.Curve

Public Member Functions

def __init__
 
def __repr__
 
def SVG
 
- Public Member Functions inherited from svgfig.LineAxis
def __init__
 
def __repr__
 
def interpret
 
def SVG
 
- Public Member Functions inherited from svgfig.Line
def __init__
 
def __repr__
 
def Path
 
def SVG
 
- Public Member Functions inherited from svgfig.Curve
def __init__
 
def __repr__
 
def Path
 
def sample
 end nested class More...
 
def subsample
 
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

 atx
 
 x1
 
 x2
 
- 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 = 90
 
dictionary text_defaults = {"stroke":"none", "fill":"black", "font-size":5, "text-anchor":"end", "dominant-baseline":"middle"}
 
float text_start = 2.5
 
- 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
 
 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 a y axis with tick marks.

YAxis(ymin, ymax, atx, ticks, miniticks, labels, logbase, arrow_start, arrow_end,
exclude, text_attr, attribute=value)

ymin, ymax              required        the y range
atx                     default=0       x 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 y 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 2989 of file svgfig.py.

Constructor & Destructor Documentation

def svgfig.YAxis.__init__ (   self,
  ymin,
  ymax,
  atx = 0,
  ticks = -10,
  miniticks = True,
  labels = True,
  logbase = None,
  arrow_start = None,
  arrow_end = None,
  exclude = None,
  text_attr = {},
  attr 
)

Definition at line 3029 of file svgfig.py.

3030  def __init__(self, ymin, ymax, atx=0, ticks=-10, miniticks=True, labels=True, logbase=None, arrow_start=None, arrow_end=None, exclude=None, text_attr={}, **attr):
3031  self.atx = atx
3032  tattr = dict(self.text_defaults)
3033  tattr.update(text_attr)
3034  LineAxis.__init__(self, atx, ymin, atx, ymax, ymin, ymax, ticks, miniticks, labels, logbase, arrow_start, arrow_end, exclude, tattr, **attr)
dictionary text_defaults
Definition: svgfig.py:2381
def __init__
Definition: svgfig.py:3029

Member Function Documentation

def svgfig.YAxis.__repr__ (   self)

Definition at line 3026 of file svgfig.py.

References svgfig.SVG.attr, svgfig.Path.attr, svgfig.Curve.attr, svgfig.Plot.atx, svgfig.YAxis.atx, svgfig.Ticks.labels, str, svgfig.Ticks.ticks, fftjetcms::LookupTable2d.ymax(), dqmoffline::l1t::HistDefinition.ymax, Exhume::Event.ymax, cscdqm::AddressBox.ymax, TrackerMap.ymax, svgfig.Plot.ymax, svgfig.Frame.ymax, svgfig.Axes.ymax, svgfig.VGrid.ymax, svgfig.Grid.ymax, fftjetcms::LookupTable2d.ymin(), PixelClusterizerBase::AccretionCluster.ymin, MTDClusterizerBase::AccretionCluster.ymin, dqmoffline::l1t::HistDefinition.ymin, Exhume::Event.ymin, cscdqm::AddressBox.ymin, and TrackerMap.ymin.

Referenced by data_sources.json_file.__str__().

3027  def __repr__(self):
3028  return "<YAxis (%g, %g) at x=%g ticks=%s labels=%s %s>" % (self.ymin, self.ymax, self.atx, str(self.ticks), str(self.labels), self.attr)
def __repr__
Definition: svgfig.py:3026
#define str(s)
def svgfig.YAxis.SVG (   self,
  trans = None 
)
Apply the transformation "trans" and return an SVG object.

Definition at line 3035 of file svgfig.py.

3036  def SVG(self, trans=None):
3037  """Apply the transformation "trans" and return an SVG object."""
3038  self.x1 = self.atx
3039  self.x2 = self.atx
3040  return LineAxis.SVG(self, trans)

Member Data Documentation

svgfig.YAxis.atx

Definition at line 3030 of file svgfig.py.

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

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

Definition at line 3021 of file svgfig.py.

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

int svgfig.YAxis.text_angle = 90
static

Definition at line 3024 of file svgfig.py.

dictionary svgfig.YAxis.text_defaults = {"stroke":"none", "fill":"black", "font-size":5, "text-anchor":"end", "dominant-baseline":"middle"}
static

Definition at line 3022 of file svgfig.py.

float svgfig.YAxis.text_start = 2.5
static

Definition at line 3023 of file svgfig.py.

svgfig.YAxis.x1

Definition at line 3037 of file svgfig.py.

Referenced by svgfig.Line.__repr__(), svgfig.LineGlobal.__repr__(), svgfig.HLine.__repr__(), svgfig.Rect.__repr__(), svgfig.LineAxis.__repr__(), svgfig.Rect.Path(), and svgfig.LineGlobal.SVG().

svgfig.YAxis.x2

Definition at line 3038 of file svgfig.py.

Referenced by svgfig.Line.__repr__(), svgfig.LineGlobal.__repr__(), svgfig.HLine.__repr__(), svgfig.Rect.__repr__(), svgfig.LineAxis.__repr__(), svgfig.Rect.Path(), and svgfig.LineGlobal.SVG().