test
CMS 3D CMS Logo

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

Public Member Functions

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 Attributes

 attr
 
 b
 
 f
 
 high
 
 loop
 
 low
 
- Public Attributes inherited from svgfig.Curve
 attr
 
 f
 
 high
 
 last_samples
 
 loop
 
 low
 

Static Public Attributes

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
 

Detailed Description

Draws an ellipse from a semimajor vector (ax,ay) and a semiminor
length (b).

Ellipse(x, y, ax, ay, b, attribute=value)

x, y                    required        the center of the ellipse/circle
ax, ay                  required        a vector indicating the length
                                        and direction of the semimajor axis
b                       required        the length of the semiminor axis.
                                        If equal to sqrt(ax2 + ay2), the
                                        ellipse is a circle
attribute=value pairs   keyword list    SVG attributes

(If sqrt(ax**2 + ay**2) is less than b, then (ax,ay) is actually the
semiminor axis.)

Definition at line 2235 of file svgfig.py.

Constructor & Destructor Documentation

def svgfig.Ellipse.__init__ (   self,
  x,
  y,
  ax,
  ay,
  b,
  attr 
)

Definition at line 2257 of file svgfig.py.

2258  def __init__(self, x, y, ax, ay, b, **attr):
2259  self.x, self.y, self.ax, self.ay, self.b = x, y, ax, ay, b
2261  self.attr = dict(self.defaults)
2262  self.attr.update(attr)
dictionary defaults
Definition: svgfig.py:1509

Member Function Documentation

def svgfig.Ellipse.__repr__ (   self)

Definition at line 2254 of file svgfig.py.

References svgfig.SVG.attr, svgfig.Path.attr, svgfig.Curve.attr, TrackFP420.ax(), TrackFP420.ay(), svgfig.Ellipse.b, Quad.x, reco::MuonRPCHitMatch.x, RPFlatParams::EP.x, gen::PdfInfo.x, reco::MuonChamberMatch.x, EnergyDepositUnit.x(), SimplePixel.x, AmplitudeSegmentFP420.x(), lumiregperbunch.bsmeas.x, TkLayerMap::XYbin.x, SignalPoint.x(), TwoBodyDecayParameters.x, reco::MuonMETCorrectionData.x(), Geom::Polar2Cartesian< T >.x(), SiStripFineDelayTOF.x(), EnergySegmentFP420.x(), HFShowerPhoton.x(), BinomialProbHelper.x(), EcalTBHodoscopeRecInfoAlgo::BeamTrack.x, reco::MuonSegmentMatch.x, PGlobalSimHit::Vtx.x, RHStopTracer::StopPoint.x, BeamSpotFakeConditions.x, ClusterShape.x, BSvsPVHistogramMaker.x(), QcdLowPtDQM::Pixel.x(), SiPixelCluster::Pixel.x, TotemTestHistoClass::Hit.x, PV2DBase< T, PVType, FrameType >.x(), PV2DBase< float, VectorTag, LocalTag >.x(), PV2DBase< float, PointTag, LocalTag >.x(), PV2DBase< float, VectorTag, MeasurementTag >.x(), PV2DBase< float, PointTag, MeasurementTag >.x(), PV2DBase< T, VectorTag, FrameTag >.x(), PV2DBase< float, VectorTag, GlobalTag >.x(), PV2DBase< T, PointTag, FrameTag >.x(), PV2DBase< float, PointTag, GlobalTag >.x(), PV2DBase< double, PointTag, LocalTag >.x(), mathSSE::Rot3< Scalar >.x(), mathSSE::Rot3< double >.x(), mathSSE::Rot3< float >.x(), mathSSE::Rot3< align::Scalar >.x(), mathSSE::Rot3< T >.x(), Geom::Cylindrical2Cartesian< T >.x(), HcalForwardAnalysis::Photon.x, ParabolaFit::Point.x, BeamSpotOnline.x(), MuScleFitMuon.x(), RooCMSShape.x, Pixinfo.x, VertexType.x, funct::GaussLegendreIntegrator.x, reco::CastorCell.x(), Hit.x, PrimaryVertexAnalyzer::simPrimaryVertex.x, PV3DBase< float, VectorTag, GlobalTag >.x(), PV3DBase< Scalar, PointTag, GlobalTag >.x(), PV3DBase< T, PointTag, FrameTag >.x(), PV3DBase< float, PointTag, GlobalTag >.x(), PV3DBase< align::Scalar, PointTag, GlobalTag >.x(), PV3DBase< long double, PointTag, GlobalTag >.x(), PV3DBase< T, PVType, FrameType >.x(), PV3DBase< float, VectorTag, LocalTag >.x(), PV3DBase< float, PointTag, LocalTag >.x(), PV3DBase< float, VectorTag, MeasurementTag >.x(), PV3DBase< float, PointTag, MeasurementTag >.x(), PV3DBase< Scalar, VectorTag, GlobalTag >.x(), PV3DBase< T, PointTag, GlobalTag >.x(), PV3DBase< T, VectorTag, FrameTag >.x(), Basic2DVector< T >.x(), Basic2DVector< Scalar >.x(), Basic2DVector< double >.x(), Basic2DVector< float >.x(), Clust.x, python.rootplot.utilities.Hist2D.x, reco::BeamSpot.x(), Geom::Spherical2Cartesian< T >.x(), QcdLowPtDQM::Vertex.x(), reco::CastorJet.x(), PixelUnpackingRegions::Module.x, Rechit.x, reco::CastorEgamma.x(), MoveFlatParamsToDB.x, Basic3DVector< long double >.x(), HcalForwardAnalysis.x, hit.x, stAPVGain.x, Geom::Cartesian2Cartesian3D< T >.x(), PrimaryVertexAnalyzer4PU::simPrimaryVertex.x, Basic3DVector< T >.x(), Basic3DVector< Scalar >.x(), Basic3DVector< double >.x(), Basic3DVector< float >.x(), Basic3DVector< align::Scalar >.x(), SiStripRecHitsValid::RecHitProperties.x, reco::CastorCluster.x(), RecHitsSortedInPhi.x, GaussianSumUtilities1D::FinderState.x, reco::Vertex.x(), VertexClassifier::GeneratedPrimaryVertex.x, funct::GaussIntegrator.x, SiPixelCluster.x(), XHistogram::position.x, mathSSE::Rot2< Scalar >.x(), mathSSE::Rot2< T >.x(), MuonGeometryArrange::MGACollection.x, python.rootplot.utilities.Hist.x, PrimaryVertexAnalyzer4PU::SimEvent.x, TrackClassifier::GeneratedPrimaryVertex.x, reco::CaloCluster.x(), lhef::HEPEUP::FiveVector.x, HitDoublets.x(), EPOS::EPOS_Wrapper.x(), BeamSpotOnlineRaw_v4.x, SiPixelDigitizerAlgorithm::EnergyDepositUnit.x(), RawParticle.x(), MuScleFitUtils.x, SiPixelDigitizerAlgorithm::SignalPoint.x(), SiStripTrackingRecHitsValid::RecHitProperties.x, perftools::detail::Hist.x, TkRotation< T >.x(), TkRotation< Scalar >.x(), TkRotation< double >.x(), TkRotation< float >.x(), TkRotation< align::Scalar >.x(), hitfit::Fourvec_Event.x(), AccretionCluster.x, TkRotation2D< T >.x(), TkRotation2D< Scalar >.x(), PDF.x, svgfig.Plot.x, svgfig.Frame.x, Vispa.Views.LineDecayView.DecayNode.x(), PMuonSimHit::Vtx.x, PTrackerSimHit::Vtx.x, svgfig.Text.x, svgfig.TextGlobal.x, svgfig.VLine.x, Quad.y, RPFlatParams::EP.y, reco::MuonChamberMatch.y, EnergyDepositUnit.y(), SimplePixel.y, AmplitudeSegmentFP420.y(), TkLayerMap::XYbin.y, lumiregperbunch.bsmeas.y, TwoBodyDecayParameters.y, SignalPoint.y(), reco::MuonMETCorrectionData.y(), Geom::Polar2Cartesian< T >.y(), SiStripFineDelayTOF.y(), EnergySegmentFP420.y(), HFShowerPhoton.y(), reco::MuonSegmentMatch.y, PGlobalSimHit::Vtx.y, RHStopTracer::StopPoint.y, BeamSpotFakeConditions.y, ClusterShape.y, BSvsPVHistogramMaker.y(), QcdLowPtDQM::Pixel.y(), SiPixelCluster::Pixel.y, TotemTestHistoClass::Hit.y, PV2DBase< float, VectorTag, LocalTag >.y(), PV2DBase< float, PointTag, GlobalTag >.y(), PV2DBase< float, VectorTag, GlobalTag >.y(), PV2DBase< float, VectorTag, MeasurementTag >.y(), PV2DBase< T, VectorTag, FrameTag >.y(), PV2DBase< float, PointTag, LocalTag >.y(), PV2DBase< T, PointTag, FrameTag >.y(), PV2DBase< double, PointTag, LocalTag >.y(), PV2DBase< T, PVType, FrameType >.y(), PV2DBase< float, PointTag, MeasurementTag >.y(), mathSSE::Rot3< float >.y(), mathSSE::Rot3< align::Scalar >.y(), mathSSE::Rot3< Scalar >.y(), mathSSE::Rot3< double >.y(), mathSSE::Rot3< T >.y(), Geom::Cylindrical2Cartesian< T >.y(), HcalForwardAnalysis::Photon.y, ParabolaFit::Point.y, BeamSpotOnline.y(), MuScleFitMuon.y(), Pixinfo.y, VertexType.y, PrimaryVertexAnalyzer::simPrimaryVertex.y, reco::CastorCell.y(), Hit.y, PV3DBase< float, PointTag, GlobalTag >.y(), PV3DBase< align::Scalar, PointTag, GlobalTag >.y(), PV3DBase< float, PointTag, LocalTag >.y(), PV3DBase< T, VectorTag, FrameTag >.y(), PV3DBase< float, VectorTag, MeasurementTag >.y(), PV3DBase< T, PointTag, GlobalTag >.y(), PV3DBase< Scalar, VectorTag, GlobalTag >.y(), PV3DBase< Scalar, PointTag, GlobalTag >.y(), PV3DBase< float, VectorTag, GlobalTag >.y(), PV3DBase< T, PointTag, FrameTag >.y(), PV3DBase< long double, PointTag, GlobalTag >.y(), PV3DBase< float, PointTag, MeasurementTag >.y(), PV3DBase< float, VectorTag, LocalTag >.y(), PV3DBase< T, PVType, FrameType >.y(), Basic2DVector< float >.y(), Basic2DVector< double >.y(), Basic2DVector< T >.y(), Basic2DVector< Scalar >.y(), Clust.y, python.rootplot.utilities.Hist2D.y, reco::BeamSpot.y(), QcdLowPtDQM::Vertex.y(), Geom::Spherical2Cartesian< T >.y(), PixelUnpackingRegions::Module.y, Rechit.y, reco::CastorEgamma.y(), reco::CastorJet.y(), MoveFlatParamsToDB.y, HcalForwardAnalysis.y, hit.y, Basic3DVector< long double >.y(), stAPVGain.y, Geom::Cartesian2Cartesian3D< T >.y(), reco::Particle.y(), PrimaryVertexAnalyzer4PU::simPrimaryVertex.y, SiStripRecHitsValid::RecHitProperties.y, RecHitsSortedInPhi.y, Basic3DVector< align::Scalar >.y(), Basic3DVector< float >.y(), Basic3DVector< double >.y(), Basic3DVector< T >.y(), Basic3DVector< Scalar >.y(), reco::CastorCluster.y(), GaussianSumUtilities1D::FinderState.y, reco::Candidate.y(), reco::Vertex.y(), contrib::CMSBoostedTauSeedingAlgorithmStructure.y(), VertexClassifier::GeneratedPrimaryVertex.y, TrackingParticle.y(), XHistogram::position.y, pat::PackedGenParticle.y(), SiPixelCluster.y(), reco::LeafRefCandidateT< T >.y(), mathSSE::Rot2< T >.y(), mathSSE::Rot2< Scalar >.y(), MuonGeometryArrange::MGACollection.y, PrimaryVertexAnalyzer4PU::SimEvent.y, python.rootplot.utilities.Hist.y, pat::PackedCandidate.y(), python.rootplot.root2matplotlib.Hist.y, TrackClassifier::GeneratedPrimaryVertex.y, HitDoublets.y(), reco::CaloCluster.y(), EPOS::EPOS_Wrapper.y(), BeamSpotOnlineRaw_v4.y, UrbanMscModel93.y, SiPixelDigitizerAlgorithm::EnergyDepositUnit.y(), reco::LeafCandidate.y(), RawParticle.y(), SiPixelDigitizerAlgorithm::SignalPoint.y(), SiStripTrackingRecHitsValid::RecHitProperties.y, TkRotation< align::Scalar >.y(), TkRotation< Scalar >.y(), TkRotation< double >.y(), TkRotation< float >.y(), TkRotation< T >.y(), Exhume::CrossSection.y, AccretionCluster.y, TkRotation2D< T >.y(), TkRotation2D< Scalar >.y(), svgfig.Plot.y, svgfig.Frame.y, Vispa.Views.LineDecayView.DecayNode.y(), PMuonSimHit::Vtx.y, svgfig.Curve.Sample.y, PTrackerSimHit::Vtx.y, svgfig.Text.y, svgfig.TextGlobal.y, and svgfig.HLine.y.

2255  def __repr__(self):
2256  return "<Ellipse (%g, %g) a=(%g, %g), b=%g %s>" % (self.x, self.y, self.ax, self.ay, self.b, self.attr)
def svgfig.Ellipse.Path (   self,
  trans = None,
  local = False 
)
Apply the transformation "trans" and return a Path object in
global coordinates.  If local=True, return a Path in local coordinates
(which must be transformed again).

Definition at line 2267 of file svgfig.py.

References TrackFP420.ax(), TrackFP420.ay(), and svgfig.Ellipse.b.

2268  def Path(self, trans=None, local=False):
2269  """Apply the transformation "trans" and return a Path object in
2270  global coordinates. If local=True, return a Path in local coordinates
2271  (which must be transformed again)."""
2272  angle = math.atan2(self.ay, self.ax) + math.pi/2.
2273  bx = self.b * math.cos(angle)
2274  by = self.b * math.sin(angle)
2276  self.f = lambda t: (self.x + self.ax*math.cos(t) + bx*math.sin(t), self.y + self.ay*math.cos(t) + by*math.sin(t))
2277  self.low = -math.pi
2278  self.high = math.pi
2279  self.loop = True
2280  return Curve.Path(self, trans, local)
def svgfig.Ellipse.SVG (   self,
  trans = None 
)
Apply the transformation "trans" and return an SVG object.

Definition at line 2263 of file svgfig.py.

References SiPixelHistoPlotter::PlotParameter.Path, SiStripHistoPlotter::PlotParameter.Path, Json::PathArgument.Path, and svgfig.Curve.Path().

2264  def SVG(self, trans=None):
2265  """Apply the transformation "trans" and return an SVG object."""
2266  return self.Path(trans).SVG()

Member Data Documentation

svgfig.Ellipse.attr

Definition at line 2260 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().

svgfig.Ellipse.b

Definition at line 2258 of file svgfig.py.

Referenced by svgfig.Ellipse.__repr__(), and svgfig.Ellipse.Path().

dictionary svgfig.Ellipse.defaults = {}
static

Definition at line 2252 of file svgfig.py.

svgfig.Ellipse.f

Definition at line 2275 of file svgfig.py.

Referenced by svgfig.Ticks.__repr__(), Vispa.Views.RootCanvasView.RootCanvasView.createGraph(), Vispa.Views.RootCanvasView.RootCanvasView.createLegoPlot(), and svgfig.Ticks.orient_tickmark().

svgfig.Ellipse.high

Definition at line 2277 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.Ellipse.loop

Definition at line 2278 of file svgfig.py.

svgfig.Ellipse.low

Definition at line 2276 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().