Code Search for Developers
 
 
  

helpers.py from matplotlib at Krugle


Show helpers.py syntax highlighted

import sys, time, os
from matplotlib.numerix.mlab import rand
from matplotlib.transforms import identity_transform, unit_bbox, Func, IDENTITY
from matplotlib.transforms import one, Point, Value, Bbox, get_bbox_transform


def rand_val(N = 1):
    if N==1: return Value(rand())
    else: return [Value(val) for val in rand(N)]

def rand_point():
    return Point( rand_val(), rand_val() )

def rand_bbox():
    ll = rand_point()
    ur = rand_point()
    return Bbox(ll, ur)

def rand_transform():
    b1 = rand_bbox()
    b2 = rand_bbox()
    return get_bbox_transform(b1, b2)





See more files for this project here

matplotlib

Matplotlib is a pure python plotting library with the goal of making\r\npublication quality plots using a syntax familiar to matlab users. \r\nThe library uses Numeric for handling large\r\ndata sets and supports a variety of output backends

Project homepage: http://sourceforge.net/projects/matplotlib
Programming language(s): C,C++,Python
License: other

  pathologies/
    const_xy.py
    shapes.py
    single_date.py
    single_point.py
    test.py
  __init__.py
  agg_memleak.py
  auto_legend.py
  dates_unit.py
  ft2font_memleak.py
  helpers.py
  inside_poly_memleak.py
  inside_poly_profile.py
  legend_unit.py
  longs_test.py
  memleak_gui.py
  memleak_hawaii3.py
  memleak_nongui.py
  memleak_transforms.py
  override_builtins.py
  simple_plot.py
  test_wxagg.py
  transform_memleak.py
  transforms_unit.py