def __init__( self, l0=0., b0=0, rot=0., **kw ): apply( _PlotContainer.__init__, (self,) ) apply( self.conf_setattr, ("HammerAitoffPlot",), kw ) self.content = _PlotComposite() self.l0 = l0 self.b0 = b0 self.rot = rot
def __init__(self, l0=0.0, b0=0, rot=0.0, **kw): super(HammerAitoffPlot, self).__init__() # apply( _PlotContainer.__init__, (self,) ) self.conf_setattr("HammerAitoffPlot", **kw) # apply( self.conf_setattr, ("HammerAitoffPlot",), kw ) self.content = _PlotComposite() self.l0 = l0 self.b0 = b0 self.rot = rot
def _draw_background( self, context ): pc = _PlotComposite() nl = self.ribs_l b = _series( -90/2, 90/2, 2*math.pi/180. ) for l0 in _series( -nl, nl, math.pi/nl ): c = apply( Curve, ([l0]*len(b), b), self.ribs_style ) pc.add( c ) nb = self.ribs_b l = _series( -180/2, 180/2, 2*math.pi/180. ) for b0 in _series( -nb, nb, 0.5*math.pi/(nb+1) ): c = apply( Curve, (l, [b0]*len(l)), self.ribs_style ) pc.add( c ) pc.render( context )