Public Member Functions | |
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 | |
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"} |
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 |
Superclass for all graphics primatives that draw ticks, miniticks, and tick labels. This class only draws the ticks. Ticks(f, low, high, ticks, miniticks, labels, logbase, arrow_start, arrow_end, text_attr, attribute=value) f required parametric function along which ticks will be drawn; has the same format as the function used in Curve low, high required range of the independent variable ticks default=-10 request ticks according to the standard tick specification (see below) miniticks default=True request miniticks according to the standard minitick specification (below) labels True request tick labels according to the standard tick label specification (below) logbase default=None if a number, the 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 text_attr default={} SVG attributes for the text labels attribute=value pairs keyword list SVG attributes for the tick marks Standard tick specification: * True: same as -10 (below). * Positive number N: draw exactly N ticks, including the endpoints. To subdivide an axis into 10 equal-sized segments, ask for 11 ticks. * Negative number -N: draw at least N ticks. Ticks will be chosen with "natural" values, multiples of 2 or 5. * List of values: draw a tick mark at each value. * Dict of value, label pairs: draw a tick mark at each value, labeling it with the given string. This lets you say things like {3.14159: "pi"}. * False or None: no ticks. Standard minitick specification: * True: draw miniticks with "natural" values, more closely spaced than the ticks. * Positive number N: draw exactly N miniticks, including the endpoints. To subdivide an axis into 100 equal-sized segments, ask for 101 miniticks. * Negative number -N: draw at least N miniticks. * List of values: draw a minitick mark at each value. * False or None: no miniticks. Standard tick label specification: * True: use the unumber function (described below) * Format string: standard format strings, e.g. "%5.2f" for 12.34 * Python callable: function that converts numbers to strings * False or None: no labels
def svgfig.Ticks.__init__ | ( | self, | |
f, | |||
low, | |||
high, | |||
ticks = -10 , |
|||
miniticks = True , |
|||
labels = True , |
|||
logbase = None , |
|||
arrow_start = None , |
|||
arrow_end = None , |
|||
text_attr = {} , |
|||
attr | |||
) |
Definition at line 2392 of file svgfig.py.
def svgfig.Ticks.__repr__ | ( | self | ) |
Definition at line 2389 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, hippyaddtobaddatafiles.KeepWhileOpenFile.f, svgfig.Curve.f, svgfig.Line.f, svgfig.Rect.f, svgfig.Ellipse.f, svgfig.Ticks.f, svgfig.Curve.high, svgfig.Line.high, svgfig.Rect.high, svgfig.Ellipse.high, svgfig.Ticks.high, svgfig.Ticks.labels, svgfig.Curve.low, svgfig.Line.low, svgfig.Rect.low, svgfig.Ellipse.low, svgfig.Ticks.low, str, and svgfig.Ticks.ticks.
Referenced by data_sources.json_file.__str__().
def svgfig.Ticks.compute_logminiticks | ( | self, | |
base | |||
) |
Return optimal logarithmic miniticks, given a set of ticks. Normally only used internally.
Definition at line 2768 of file svgfig.py.
References svgfig.Curve.high, svgfig.Line.high, svgfig.Rect.high, svgfig.Ellipse.high, svgfig.Ticks.high, createfilelist.int, svgfig.Curve.low, svgfig.Line.low, svgfig.Rect.low, svgfig.Ellipse.low, and svgfig.Ticks.low.
Referenced by svgfig.Ticks.interpret().
def svgfig.Ticks.compute_logticks | ( | self, | |
base, | |||
N, | |||
format | |||
) |
Return less than -N or exactly N optimal logarithmic ticks. Normally only used internally.
Definition at line 2718 of file svgfig.py.
References funct.abs(), svgfig.Ticks.compute_ticks(), svgfig.Curve.high, svgfig.Line.high, svgfig.Rect.high, svgfig.Ellipse.high, svgfig.Ticks.high, createfilelist.int, svgfig.Curve.low, svgfig.Line.low, svgfig.Rect.low, svgfig.Ellipse.low, svgfig.Ticks.low, genParticles_cff.map, and min().
Referenced by svgfig.Ticks.interpret().
def svgfig.Ticks.compute_miniticks | ( | self, | |
original_ticks | |||
) |
Return optimal linear miniticks, given a set of ticks. Normally only used internally.
Definition at line 2690 of file svgfig.py.
References funct.abs(), 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, min(), and svgfig.Ticks.ticks.
Referenced by svgfig.Ticks.interpret().
def svgfig.Ticks.compute_ticks | ( | self, | |
N, | |||
format | |||
) |
Return less than -N or exactly N optimal linear ticks. Normally only used internally.
Definition at line 2602 of file svgfig.py.
References funct.abs(), svgfig.Curve.high, svgfig.Line.high, svgfig.Rect.high, svgfig.Ellipse.high, svgfig.Ticks.high, createfilelist.int, svgfig.Curve.low, svgfig.Line.low, svgfig.Rect.low, svgfig.Ellipse.low, svgfig.Ticks.low, and SiStripPI.max.
Referenced by svgfig.Ticks.compute_logticks(), and svgfig.Ticks.interpret().
def svgfig.Ticks.interpret | ( | self | ) |
Evaluate and return optimal ticks and miniticks according to the standard minitick specification. Normally only used internally.
Definition at line 2508 of file svgfig.py.
References funct.abs(), svgfig.Ticks.compute_logminiticks(), svgfig.Ticks.compute_logticks(), svgfig.Ticks.compute_miniticks(), svgfig.Ticks.compute_ticks(), svgfig.Curve.high, svgfig.Line.high, svgfig.Rect.high, svgfig.Ellipse.high, svgfig.Ticks.high, svgfig.Ticks.labels, svgfig.Ticks.logbase, svgfig.Curve.low, svgfig.Line.low, svgfig.Rect.low, svgfig.Ellipse.low, svgfig.Ticks.low, svgfig.Ticks.miniticks, svgfig.Ticks.regular_miniticks(), and svgfig.Ticks.ticks.
Return the position, normalized local x vector, normalized local y vector, and angle of a tick at position t. Normally only used internally.
Definition at line 2409 of file svgfig.py.
References funct.abs(), hippyaddtobaddatafiles.KeepWhileOpenFile.f, svgfig.Curve.f, svgfig.Line.f, svgfig.Rect.f, svgfig.Ellipse.f, svgfig.Ticks.f, 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, and svgfig.totrans().
def svgfig.Ticks.regular_miniticks | ( | self, | |
N | |||
) |
Return exactly N linear ticks. Normally only used internally.
Definition at line 2678 of file svgfig.py.
References 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, and svgfig.Ticks.low.
Referenced by svgfig.Ticks.interpret().
Apply the transformation "trans" and return an SVG object.
Definition at line 2436 of file svgfig.py.
References svgfig.totrans().
svgfig.Ticks.arrow_end |
Definition at line 2401 of file svgfig.py.
Referenced by svgfig.CurveAxis.SVG().
svgfig.Ticks.arrow_start |
Definition at line 2400 of file svgfig.py.
Referenced by svgfig.Line.SVG(), svgfig.LineGlobal.SVG(), and svgfig.CurveAxis.SVG().
svgfig.Ticks.attr |
Definition at line 2403 of file svgfig.py.
Referenced by svgfig.Ticks.__repr__(), svgfig.Axes.__repr__(), svgfig.HGrid.__repr__(), svgfig.VGrid.__repr__(), svgfig.Grid.__repr__(), svgfig.Axes.SVG(), svgfig.XErrorBars.SVG(), and svgfig.YErrorBars.SVG().
|
static |
Definition at line 2380 of file svgfig.py.
Referenced by tree.Tree.reset(), and tree.Tree.var().
svgfig.Ticks.f |
Definition at line 2393 of file svgfig.py.
Referenced by svgfig.Ticks.__repr__(), Vispa.Views.RootCanvasView.RootCanvasView.createGraph(), Vispa.Views.RootCanvasView.RootCanvasView.createLegoPlot(), ztail.Decoder.initial_synchronize(), and svgfig.Ticks.orient_tickmark().
svgfig.Ticks.high |
Definition at line 2395 of file svgfig.py.
Referenced by svgfig.Ticks.__repr__(), svgfig.HGrid.__repr__(), svgfig.VGrid.__repr__(), svgfig.Ticks.compute_logminiticks(), svgfig.Ticks.compute_logticks(), svgfig.Ticks.compute_miniticks(), svgfig.Ticks.compute_ticks(), svgfig.Ticks.interpret(), svgfig.Ticks.orient_tickmark(), and svgfig.Ticks.regular_miniticks().
svgfig.Ticks.labels |
Definition at line 2398 of file svgfig.py.
Referenced by svgfig.Ticks.__repr__(), svgfig.CurveAxis.__repr__(), svgfig.LineAxis.__repr__(), svgfig.XAxis.__repr__(), svgfig.YAxis.__repr__(), confdb.HLTProcess.dump(), and svgfig.Ticks.interpret().
svgfig.Ticks.logbase |
Definition at line 2399 of file svgfig.py.
Referenced by svgfig.Ticks.interpret().
svgfig.Ticks.low |
Definition at line 2394 of file svgfig.py.
Referenced by svgfig.Ticks.__repr__(), svgfig.HGrid.__repr__(), svgfig.VGrid.__repr__(), svgfig.Ticks.compute_logminiticks(), svgfig.Ticks.compute_logticks(), svgfig.Ticks.compute_miniticks(), svgfig.Ticks.compute_ticks(), svgfig.Ticks.interpret(), svgfig.Ticks.orient_tickmark(), and svgfig.Ticks.regular_miniticks().
svgfig.Ticks.miniticks |
Definition at line 2397 of file svgfig.py.
Referenced by svgfig.HGrid.__repr__(), svgfig.VGrid.__repr__(), svgfig.Grid.__repr__(), and svgfig.Ticks.interpret().
svgfig.Ticks.text_attr |
Definition at line 2406 of file svgfig.py.
Referenced by svgfig.Axes.SVG().
|
static |
Definition at line 2381 of file svgfig.py.
Referenced by svgfig.CurveAxis.__init__().
svgfig.Ticks.ticks |
Definition at line 2396 of file svgfig.py.
Referenced by svgfig.Ticks.__repr__(), svgfig.CurveAxis.__repr__(), svgfig.LineAxis.__repr__(), svgfig.XAxis.__repr__(), svgfig.YAxis.__repr__(), svgfig.HGrid.__repr__(), svgfig.VGrid.__repr__(), svgfig.Grid.__repr__(), svgfig.Ticks.compute_miniticks(), and svgfig.Ticks.interpret().