CMS 3D CMS Logo

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

List of all members.

Public Member Functions

def __init__
def __repr__
def SVG

Public Attributes

 atx
 x1
 x2

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

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

03030                                                                                                                                                         {}, **attr):
03031     self.atx = atx
03032     tattr = dict(self.text_defaults)
03033     tattr.update(text_attr)
03034     LineAxis.__init__(self, atx, ymin, atx, ymax, ymin, ymax, ticks, miniticks, labels, logbase, arrow_start, arrow_end, exclude, tattr, **attr)
03035 

Member Function Documentation

def svgfig::YAxis::__repr__ (   self)

Reimplemented from svgfig::LineAxis.

Definition at line 3027 of file svgfig.py.

03028                     :
03029     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 svgfig::YAxis::SVG (   self,
  trans = None 
)
Apply the transformation "trans" and return an SVG object.

Reimplemented from svgfig::LineAxis.

Definition at line 3036 of file svgfig.py.

03037                            :
03038     """Apply the transformation "trans" and return an SVG object."""
03039     self.x1 = self.atx
03040     self.x2 = self.atx
03041     return LineAxis.SVG(self, trans)


Member Data Documentation

Definition at line 3030 of file svgfig.py.

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

Reimplemented from svgfig::LineAxis.

Definition at line 3022 of file svgfig.py.

int svgfig::YAxis::text_angle = 90 [static]

Reimplemented from svgfig::Ticks.

Definition at line 3025 of file svgfig.py.

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

Reimplemented from svgfig::LineAxis.

Definition at line 3023 of file svgfig.py.

float svgfig::YAxis::text_start = 2.5 [static]

Reimplemented from svgfig::Ticks.

Definition at line 3024 of file svgfig.py.

Definition at line 3036 of file svgfig.py.

Definition at line 3036 of file svgfig.py.